Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ramcharan Madasu
    @react-ram
    i have problem in writing the resolver please help me
    getHero: (_, args, context) => heroes.find(e => e === args.id)
    and my query is
    {
      getHero(id:1000){
        id
        name
      }
    }
    Ramcharan Madasu
    @react-ram
    got the answer thankyou
    Constantin Angheloiu
    @cmnstmntmn
    hey i have a composed query
    export const USER = gql`
      query User {
        User {
          ID
          FirstName
          LastName
          Email
          hasLocations @client
        }
        Locations {
          ID
          Name
          City
          Address
          State
          CreatedAt
        }
      }
    `;
    and a resolver
    export const resolvers = {
      User: {
        hasLocations(obj, args, context, info) {
            // -- count the locations and set to false / true
          return true;
        }
      }
    };
    any ideea how i could acces the Location query inside my hasLocation field?
    Prithivraj200
    @Prithivraj200
    Hi, can someone help me on subscription using express-graphql
    lynn303
    @lynn303
    How to group go graphql
    Seyidna Ali
    @seyidnaali
    hello
    I need a help plz
    Seyidna Ali
    @seyidnaali
    how can Embleed Graphql Document ?
    Ahmed Rebai
    @Rebaiahmed
    @seyidnaali I think it's related to your database schemas
    what do you mean excactlu
    MAROC TROC
    @troc_maroc_twitter
    Hi
    Is there a way to get the query name before it's executed
    i'm trying to make a middleware that only lets certain queries go through if not authorized
    example :
    if currentquery=="login" { //execute the query }
    if currentquery=="something else" {
    //check the authorization header
    then
    //execute the query
    }
    i'm currently doing this in the resolver of each query which is not practical
    Henry Sequeda González
    @stdevHsequeda
    Hi, I am using graphql-go. Anyone know any way to set an Enum to Default value in a query arguments??
    dadochudy
    @dadochudy
    hi is there way to do this in graphql scheme
    type test{
    [prop: String!]: JSONObject;
    }
    Seyidna Ali
    @seyidnaali
    hello
    MAROC TROC
    @troc_maroc_twitter
    @seyidnaali hhhhh ali
    Jordan Max
    @jordantomax
    I'm having some issues with base64 encoding using the relay library. I created a SO post here: https://stackoverflow.com/questions/61684910/graphql-go-relay-the-base64-hash-of-my-node-id-is-not-what-i-expect. If anybody can help, would really appreciate it!
    Jordan Max
    @jordantomax
    Never mind, figured it out!
    Robert
    @robert197
    we used graphql with wagtail cms django based: https://medium.com/@devs_group/why-our-websites-stay-ahead-c608e3f4bea4
    here is the repo
    Seyidna Ali
    @seyidnaali
    @troc_maroc_twitter sorry ?
    Sameer Kashyap
    @Sameerkash
    Hello, I'm struggling a bit with graphql-cli 4x.x what would be the equivalent of graphql get-schema in 4.x.x? To fetch the schemea from a grpahql endpoint ?
    Brian Wright
    @bwright1558
    Hi, I'm new to this golang graphql library. I was looking at the concurrent example here.
    Why does the library not run the resolvers concurrently by default? If making this behavior the default is a huge breaking change, then perhaps we could add an opt-in wrapper function to the library to enable the feature. Maybe something like this
    func AsyncResolve(fn graphql.FieldResolveFn) graphql.FieldResolveFn {
        return func(p graphql.ResolveParams) (interface{}, error) {
            type result struct {
                data interface{}
                err  error
            }
            ch := make(chan *result, 1)
            go func() {
                defer close(ch)
                data, err := fn(p)
                ch <- &result{data: data, err: err}
            }()
            return func() (interface{}, error) {
                r := <-ch
                return r.data, r.err
            }, nil
        }
    }
    Brian Wright
    @bwright1558

    With the above function, you could now easily do stuff like the following:

    fields := graphql.Fields{
        "hello": &graphql.Field{
            Type: graphql.String,
            Resolve: AsyncResolve(func(p graphql.ResolveParams) (interface{}, error) {
                fmt.Println("hello")
                time.Sleep(5 * time.Second)
                fmt.Println("hello done")
                return "hello", nil
            }),
        },
        "world": &graphql.Field{
            Type: graphql.String,
            Resolve: AsyncResolve(func(p graphql.ResolveParams) (interface{}, error) {
                fmt.Println("world")
                time.Sleep(3 * time.Second)
                fmt.Println("world done")
                return "world", nil
            }),
        },
    }

    and voila, you've got resolvers that run concurrently :)

    Jeroen Rinzema
    @jeroenrinzema
    Hi guys, Is it possible to return a empty object somehow?
    I got a mutation which is returning nothing and am wondering how to handle this. I am currently receiving the following error when trying to start the GraphQL server: fields must be an object with field names as keys or a function which return such an object
    Jeroen Rinzema
    @jeroenrinzema
    I now solved it by setting a _empty field but am wondering if there are better ways to solve this issue
    Seyidna Ali
    @seyidnaali
    var getResultat =&graphql.Field{
        Type : ????????????
        Args : graphql.FieldConfigArgument{
            "type": &graphql.ArgumentConfig{
                Type : strings,
            }
            "code": &graphql.ArgumentConfig{
                Type : strings,
            }
        }
        Resolve: func(p graphql.ResolveParams) (interface{}, error) {
            filter := bson.M{}
            if T := p.Args["type"]; T != nil {
                filter["type"] = T.(string)
                return (&models.A{}).listA(filter)
            }
            if B := p.Args["isHappy"]; B != nil {
    
                filter["isbn"] = I.(string)
            }
             return (&models.Book{}).listB(filter)
    
        },
    }
    how to check the type regarding the result (Atype or Booktype)
    matrixbot
    @matrixbot
    dddw anyone know a good manual to deploy graphql with nginx ssl termination ?
    currently have a salero setup which runs a wsgi-cpython server to which we upstream. It works! But we keep getting different query outputs on queries directly to the wsgi/cpython and to the nginx-server
    Aditya Gudipati
    @Adityagudipati6_twitter

    Hi All,
    How can I write Graphql Types for an Array of Objects inside Object inside Object inside root Object?

    Ex: {
    trigger_info : {
    trigger_data: {
    [
    {
    trigger_id : "001",
    trigger_date : "01/02/20",
    trigger_user : "John",
    trigger_description : "xxxxxxxx"
    },
    {
    trigger_id : "002",
    trigger_date : "01/03/20",
    trigger_user : "Paul",
    trigger_description : "xxxxxxxx"
    },
    {
    trigger_id : "003",
    trigger_date : "01/05/20",
    trigger_user : "Finch",
    trigger_description : "xxxxxxxx"
    }
    ]
    }
    }
    }

    Can Anyone please let me know the model for this above example. If you can, It would be more helpful for me. Thanks a lot in advance.

    @silentnull @patcito@gmail.com @mail@matthiasloibl.com

    tsavercool
    @tsavercool

    Hey all, looking for some assistance with nested object OR subdocuments, I'm not sure which use case is correct. I've got Graphql in front of MongoDB. The object in my schema is not flat, it has 1 property that is an object. I need to be able to select object based on values in the properties of this child object.

    Does anyone know of a good example of this that they could link me to?

    Mongo data:

    {
      car: { 
        color: "red",
       engine: { hp: 10 }
    }
    }

    Graph Schema I tried, seams invalid.

    type Car {
      color: String
      engine: {
        hp: Int
      }
    }

    Other schema I tried, compiles but I can't figure out how to filter on the child object:

    type Engine {
      hp: Int
    }
    
    type Car {
      color: String
      engine: Engine
    }
    opahopa
    @opahopa
    Hi! anyone made a graphql go client with subscriptions? just designing some proj and figuring out if it will work with reasonable effort with golang
    Abhishek Sah
    @Abhishek12345679
    Hey ?
    Branden Horiuchi
    @bhoriuchi
    @opahopa i have for an internal project but it’s super basic and lightly tested and a slight mess. Definitely possible though
    alancnet
    @alancnet
    Hi all! My pull request is ready! graphql-go/graphql#558
    alancnet
    @alancnet
    matrixbot
    @matrixbot
    trajanus Has anyone here experience with dGraph?
    trajanus It looks like just what I need but wanted to solicit any impressions or tips from those who have already used it.
    Apostolis A.
    @exapsy
    Hey guys. How do you handle scope authentication in go-graphql?
    I will probably make a custom extension type Extension with scope configuration, but I'm unsure about the details yet
    Scope authentication: Like when you dont want the user to have access to other user's private info.
    Apostolis A.
    @exapsy
    found out extensions are not what I should use, directives are.
    mynameistechie
    @mynameistechie
    Hey All, We're hiring for Java Developer with GraphQl at Dallas,TX. If you're interested do connect with me on https://www.linkedin.com/in/karnala-harish-harry/ and sorry if this post is not allowed here
    coolemur
    @coolemur

    Hi

    Just published graphql api generator for mongodb (that can be extended with your own queries/mutations). https://github.com/coolemur/graphql-api-generator . It takes simple json schema object definition (custom) and generates API CRUD (with search, find, sort, take, skip)

    Check it out

    It's just a beginning, but I will try to add more features later