by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Andrea Limoli
    @limoli
    Good afternoon, could someone tell me something about the issue graphql-go/graphql#414 ?
    Andrea Limoli
    @limoli
    Moreover, I would ask you about BindFields method. Have you ever tried to execute it on a structure which has some time.Time fields? It seems that BindFields doesn't handle that.
    Andrea Limoli
    @limoli
    Song Liu
    @leopku
    Hi guys. Thanks for this awesome project first.
    I’m new to graphql-go.
    Now I had a question, how to define a custom Field in Fields.
    For example, there is an Author and a Book
    Song Liu
    @leopku
    Author := graphql.Fields{
      “id”:         &graphql.Field{Type: graphql.Int},
     “name”:  &graphql.Field{Type: graphql.String},
    }
    Post := graphql.Fields{
      “id”: &graphql.Field{Type: graphql.Int},
      “author”: &graphql.Field{Type: ???}  <— how to define here?
    }
    dinesh
    @1532j0004kg
    hello
    Bambus
    @vlatk0o

    Is there any good example for Subscription with Spring Boot application? I have tried the example in spring boot examples repo, but It is stacked at: "Your subscription data will appear here after server publication!"

    I have found this too: https://jivimberg.io/blog/2018/10/23/reactive-graphql-subscriptions-from-kafka/ but dependencies are missing and It is Kotlin and not Java...

    Christoph, René Pardon
    @renepardon

    Hi!

    I’ve two queries which don’t have parameters:

    GetInventory(): Int!

    and:

    LogoutUser(): null

    Both fail with following error:

    Syntax Error: Expected Name, found )

    If I add name: String it works but they don’t need arguments. Can you please assist me solving this error?

    I use import {buildSchema} from 'graphql‘; to build the schema for express-graphql server.

    const schema = buildSchema([typeDefs, operations].join('\r\n'));

    Where typeDefs is a concatenated string of all types and operations contains concatenated mutations and queries.

    TejaPrakashChoudary
    @tejaprakashchoudary
    Hey everyone,how to give 'Blob' in graphql
    Ex: I gave Blob in my spring boot code so now i need to integrate that spring code with graphql,so i need to give type say for example (type graphql{
    id:int!,name:string!,email:string,image:(For this what i have to give),Thanks in advance
    Tom H Anderson
    @TomHAnderson
    use a base64 encoding and make it a string
    tunguyen
    @tunguyennnnn
    hey guys, how come my delete query doesn't force my component to rerender?
    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 })
                console.log(data)
                data.threads.edges = data.threads.edges.filter(({ node }) => node.id !== id)
                console.log(data)
                proxy.writeQuery({ query: myNotesQuery, data })
              } catch (e) {
                console.log(e)
              }
            }
          })
        } catch (e) {
          console.log(e)
        }
      }
    the data does change but afterproxy.writeQuery it doesn't update my component
    Matti Andreas Nielsen
    @DenLilleMand
    How do you people generate the documentation for the schema defined in Golang? i was looking at https://github.com/2fd/graphdoc 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
    @DenLilleMand
    Nvm, i found a open issue with it, giving me good directions. :)
    Angus Hollands
    @agoose77
    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
    @glennyengelen

    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

    priyagr
    @priyagr
    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
    @TomHAnderson
    @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.
    priyagr
    @priyagr
    @TomHAnderson ok cool. Thanks
    Pokerkoffer
    @Pokerkoffer

    How can i solve the lost update problem in graphql properly?https://en.wikipedia.org/wiki/Write%E2%80%93write_conflict

    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
    @BitPhinix
    Hi :)
    Tiago Correia
    @tiagocorreiaalmeida
    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
    @geekman75000
    hi there
    Tom H Anderson
    @TomHAnderson
    Hi Benoit; this channel is not often populated. How are you?
    Benoît Burgat
    @geekman75000
    Fine thank you ! i needed some help ^^
    SHIVAM GUPTA
    @shivam3112_twitter
    Hi
    I want to perform automation testing on graphql
    I have no idea how to do that. It's totally new for me.
    Andrea Limoli
    @limoli
    What is the best way to pass a database connection to a resolver?
    Tiago Correia
    @tiagocorreiaalmeida
    On the context @limoli
    funkymonk
    @kentcabarle
    Hi! Has anyone used Hasura here? I followed this guide: "https://www.smashingmagazine.com/2018/12/real-time-app-graphql-subscriptions-postgres/" but getting this error when doing hasura migration apply
    image.png
    × 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
    dinesh
    @1532j0004kg
    @kentcabarle are you using serverless?
    Josh Reeter
    @jreeter
    should input types only reference other input types?
    Max Goodman
    @maxgrok

    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?: https://thegraph.com/explorer/subgraph/graphprotocol/uniswap
    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.

    Himadri
    @iamhimadri

    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) {
          id
          name
          data(
            filter: $filter
          )
        }
      }
    `;

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

    How do i need structure this ?

    Pavan Rajendra Bahuguni
    @PavanBahuguni

    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?