Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    deleteNote = async (id) => {
        try {
          const { deleteNote } = this.props
          const response = await deleteNote({
            variables: { id },
            update: (proxy, { data: { deleteNote } }) => {
              try {
                if (!deleteNote) return
                const data = proxy.readQuery({ query: myNotesQuery })
                data.threads.edges = data.threads.edges.filter(({ node }) => !== id)
                proxy.writeQuery({ query: myNotesQuery, data })
              } catch (e) {
        } catch (e) {
    the data does change but afterproxy.writeQuery it doesn't update my component
    Matti Andreas Nielsen
    How do you people generate the documentation for the schema defined in Golang? i was looking at which does it from JSON, but i'm not sure how much work would be in generating some JSON from the Golang defined Schema
    Matti Andreas Nielsen
    Nvm, i found a open issue with it, giving me good directions. :)
    Angus Hollands
    Hi all, does anyone know of a way to effectively avoid binding a field to a name in a query result, so that inline fragments which handle different types can present the same output format?
    e.g if one fragment access a variable "url" several layers deep, and another only goes one layer deep, the end result is flat in both cases with a field "url
    glenn engelen

    Oke I have a question, what is the best way to hide data in your client? So lets pretend I need the address of an user, I will query this by his user name, This means that client will send a http request to my graph API. Lets assume we got an user with bad intentions and he sends the same http request but with a different query to get the complete user information (including all private data and data needed for the server only). What is the best way to protect and hide private and extra data, so not all his data is accessible to him? Should i make different models, extra queries or what would you guys do?

    p.s: sorry for my bad english

    Hi..I am using apollo angular where I am accessing graphql server which is configured in drupal8. I am trying to register a new user using createUserUser mutation but getting some permission error. Please help me out.
    Tom H Anderson
    @priyagr You'll have better luck in a drupal chatroom.
    @glennyengelen your graphql should be protected with a service. I recommend OAuth2. Then only authorized users can fetch their data. If you have to add further filtering on the graphql endpoint then do so. I honestly feel using graphql to get user data is very bad. Just use a /me RPC to get current user data.
    @TomHAnderson ok cool. Thanks

    How can i solve the lost update problem in graphql properly?

    For example two users fetch the same resource, both users submit their mutations (e.g. a update on a resource) one after another then the first update will be overwritten by the second one

    In Rest there is the E-Tag to "lock" a resource optimistically
    another solution would be versioning the resource. every query gets the version of a resource and provides this in the mutation request. if it doesn't match with the servers one another update modified the resource in the meantime
    Eric Meier
    Hi :)
    Tiago Correia
    How are you guys handling input data sanitize over mutations? for validation im using joi, but no idea what to use for sanitize or if I should just make some validations by myself?
    Benoît Burgat
    hi there
    Tom H Anderson
    Hi Benoit; this channel is not often populated. How are you?
    Benoît Burgat
    Fine thank you ! i needed some help ^^
    I want to perform automation testing on graphql
    I have no idea how to do that. It's totally new for me.
    Andrea Limoli
    What is the best way to pass a database connection to a resolver?
    Tiago Correia
    On the context @limoli
    Hi! Has anyone used Hasura here? I followed this guide: "" but getting this error when doing hasura migration apply
    × hasura platform:migration apply failed error=[1000] Could not parse directory as a Hasura project | hasura.yaml, clusters.yaml, conf/, microservices/ and migrations/ should be present | Search stopped at filesystem boundary
    @kentcabarle are you using serverless?
    Josh Reeter
    should input types only reference other input types?
    Max Goodman

    Hey not sure if this is the place to post this, but having some trouble with GraphQL/React App querying the Uniswap-subgraph GraphQL API.

    Trying to find all the transactions where a certain user address is concerned.

    Query: { transactions(where: {userAddress: $userAddress}) { id ethAmount timeStamp } }

    Query Variables:
    { "userAddress":"0x000817415963a38c16ba6ccc98f4002684c97697" }

    I need to have the userAddress change variables periodically based on user in the components I have setup, but want to make sure the query is correct now. Could someone help me debug?:
    Graph Explorer
    Graph Explorer - Find all the data being indexed on The Graph
    Find all the data being indexed on The Graph and run queries directly from your dApp.


    Hi guys,

    I getting following error in below query

    import gql from 'graphql-tag.macro';
    export const WIDGET_QUERY = gql`
      query Widget(
        $id: ID!
        $filter: [FilterInput]
      ) {
        widget(id: $id) {
            filter: $filter

    Uncaught Error: You must wrap the query string in a "gql" tag

    How do i need structure this ?

    Pavan Rajendra Bahuguni

    Hi Guys,
    When we are using graphqlHTTP, the first argument passed to the resolve method is actually the parameters passed by the client query not root this is fine for a query resolver. But for a usecase where field resolver needs to know of a value of the parent, how to achieve this?

    type Person {
        name: String,
        cityId: String,
        city: City,

    In the above scenario I would like where city would be a field resolver, and it needs access to cityId which is a property on parent type. I assume this should have been passed as parameter to the field resolver but that is not the case.
    Is there a way to achieve this?


    Is there a way to intercept the graph response sent back to the client in order to perform transformations?

    The particular case I am looking at is using GraphQL to map to another DSL that also has a graph shape to it. The problem with using this particular DSL is that everything has to be provided in a single query and it isn't intuitive resulting in mistakes being made often.

    So basically the plan is to use GraphQL to keep building up the single query through field resolvers and terminated by some delimiter. Getting through the request on the server I could simply fill in some placeholder data to progress through the resolvers (the ongoing query being constructed would be stored in some form of transient or temporary field); however, once the final query has been constructed and executed how could I then replace that place holder data with the real values before responding to the client ? Any thoughts ?

    Jared Hamby
    hi, so i'm attempting to use graphql-ruby and was wondering if there was a way to get metadata (pagination data) in my request when i'm requesting an array of a type - without using the connections (not a huge fan of the edges and such).
    hi all ,i have a probleme to get graphql how can help me
    Anthony Dito
    Hi all! I submitted a PR graphql-go/graphql#462 to update the example for concurrent resolvers to use a done channel. I would appreciate some feedback on it!
    Peter Edin
    Hi there, I came across a manifestation of this issue when building out an application: graphql-go/graphql#145, I then implemented this (poorly made) fix: edinpeter/graphql@00e5f12. I was wondering if anyone would be interested in making it a little more "productionized", as I've been writing Go for a about a week now and lack the experience / knowledge required to get this fix into the master branch, ie cutting out the external dependency since I noticed graphql-go/graphql has none

    hello, I want a query to filter objects which have a field equaling to null. I've written this:

    query { transferSet (joint: null) { edges { node { id }}}}

    Syntax error returned: Unexpected Name "null". How could I express this in GraphQL?

    Tom H Anderson
    (joint_isnull: true)
    thanks. joint_Isnull works for me. My backend is built by Graphene.
    I am going to develop a web application and expose few APIs - which one would be the best choice - REST or GraphQL or Falcor ?

    i just come across restQL ( which talks about huge advantages then GraphQL and Falcor

    GraphQL and Falcor has various advantages then REST.

    for the new web applicatio, can i use restQL. Can somebody comment on this, please?

    I am going to learn a front end technology for fastest web application. Angular or React JS - which would be the best choice in terms of performance from front end side.


    I am trying to make an application to compile ( I do not have much experience in graphql) would appreciate if any clue on this error message.

            throw Error('Query type must be a builtType, an array with a built type or a graphql scalar type, got ' + type);
    Error: Query type must be a builtType, an array with a built type or a graphql scalar type, got [String]
        at getType (/home/bastian/projects/xelm-using-npm/elmsti/server/node_modules/graphql-verified/dist/src/graphql-helpers.js:59:15)
        at /home/bastian/projects/xelm-using-npm/elmsti/server/node_modules/graphql-verified/dist/src/build-type.js:81:52
        at Array.forEach (<anonymous>)
        at buildType (/home/bastian/projects/xelm-using-npm/elmsti/server/node_modules/graphql-verified/dist/src/build-type.js:61:29)
        at Object.<anonymous> (/home/bastian/projects/xelm-using-npm/elmsti/server/dist/src/api/graphql/product.js:148:51)
        at Module._compile (module.js:653:30)
        at Object.Module._extensions..js (module.js:664:10)
    Does anyone know why this happens.? type gqlerrors.FormattedError has no field or method OriginalError
    Anyone familiar with Snapshot testing here?
    David Siefert
    does the concurrent resolver functionality (returning a thunk in Resolver field of graphql.Field) currently work? i'm returning my resolver wrapped in a thunk, but looking at my tracing--nothing seems to be executing in parallel, it is still done serially.
    i'm jumping into the source, but i'm not seeing anything that is executing these thunks in parallel, its still done serially... am i overlooking something?
    David Siefert
    ah--i found my answer in this closed github issue: graphql-go/graphql#421
    Sandeep Dass
    Hello people, I have just started working on graphql (Java) and it is very much interesting to know about its features. Currently I am stuck in a problem where I want the user to query with multiple arguments at multiple places in the hierarchy of query. have a look at the following example:
    smartDocTreeConfig {
    contextMenuConfig {
    sections {
    section {
    sectionType(value: "descriptionItem")
    menus {
    menu {
    actions {
    action {