Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Christian Palazzo
    sorry wrong room
    Denis Angulo

    Hello all, I'd like to contribute an example involving the database/sql null types, should I:

    • a) append it to the already existing custom-scalar-type one


    • b) create an entirely new example



    Can anyone point me to a reference implementation of nested / namespaced Mutations?

    mutation {
      Diagnostics {

    Presently have single level working just fine (i.e. no Diagnostics in the object above). I can define the schema just fine however run into problems with the sub-mutation actually being resolved.

    Branden Horiuchi
    Mutations can only have top level field resolvers they are not like queries where you can resolve sub fields. Mutations also run serially
    Hello, Im studying graphql and trying to use it in an existing (huge) project. Have you ever used graphql + clean architeture ? I dont have a lot of experience with graphql, but it seems to go through more than a layer (https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)
    Carl A Lewis
    What is the problem you are having?
    @Nemesisesq I have lots of use cases (business logic layer), its hard for me to connect existing use cases to graphql, for example: if i was using soap/xml and choose to migrate to rest, i'd just update my presenters. its not the case with graphql, its not about just presentation. It doesnt seem to be a good idea to refactor all my application to fit graphql.
    Thanks @bhoriuchi - I was able to register and post data to the resolver but could return the correct data, so you’ve explained this.
    Carl A Lewis
    Ronan, when converting an app to graphologists I build my schemes and then fulfill the contract using my resolvers.
    You shouldn’t need to do any refactoring
    Hi all, can someone please recommend automation testing tool for graphql (apart from soapui, apifortress, just-api, easygraphql-tester). Thanks
    Ali Tai
    Hi folks! My name is Alison Tai and I’m a program manager at Microsoft. We are looking at how we can improve Azure, and are interested in hearing from you about your API usage. If you are willing, we would greatly appreciate your input on this quick survey: https://aka.ms/AA6378e. Thank you for your time and consideration!
    Hi folks, I am exploring a graphql and want to know if why is there "graph" in GraphQL?
    Does GraphQL uses Graph theory somehow? If yes, then how?
    Thanks in advance :)
    Tom H Anderson
    GraphQL can query deep, so more than just one entity and a list of columns, it can query related data, a graph of data.
    Thanks @TomHAnderson , Relations are also involved in trees as well then why GraphQL only preaches about graphs?
    some domains use grapnel query, how can i scan the list of domains who are using grapnel ?
    Hi! Is there a way to pick certain fields from a type when defining schema? E.g., I have type Product { .... } and type CMStockEntry { product: Product!, qty: Int! } and I want to specify that only name and id fields of Product will be returned by the API (@rest)
    Chongyi Zheng
    Hi. I wonder whether I can know which fields are being queried in the Resolve function?
    Ramcharan Madasu
    const express = require("express");
    const { gql, ApolloServer } = require("apollo-server-express");
    const heroes = [
      { id: 1000, name: "bunny" },
      { id: 2000, name: "ram" }
    const typeDefs = gql`
      type Query {
        heroes: [Hero]
        getHero(id: Int): Hero
      type Hero {
        id: Int
        name: String
    const resolvers = {
      Query: {
        heroes: () => heroes,
        getHero: (_, args, context) => heroes.find(e => e === args.id)
    const server = new ApolloServer({ typeDefs, resolvers });
    const app = express();
    server.applyMiddleware({ app });
    app.listen({ port: 4000 }, () =>
      console.log("http://localhost:4000" + server.graphqlPath)
    i have problem in writing the resolver please help me
    getHero: (_, args, context) => heroes.find(e => e === args.id)
    and my query is
    Ramcharan Madasu
    got the answer thankyou
    Constantin Angheloiu
    hey i have a composed query
    export const USER = gql`
      query User {
        User {
          hasLocations @client
        Locations {
    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?
    Hi, can someone help me on subscription using express-graphql
    How to group go graphql
    Seyidna Ali
    I need a help plz
    Seyidna Ali
    how can Embleed Graphql Document ?
    Ahmed Rebai
    @seyidnaali I think it's related to your database schemas
    what do you mean excactlu
    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
    //execute the query
    i'm currently doing this in the resolver of each query which is not practical
    Henry Sequeda González
    Hi, I am using graphql-go. Anyone know any way to set an Enum to Default value in a query arguments??
    hi is there way to do this in graphql scheme
    type test{
    [prop: String!]: JSONObject;
    Seyidna Ali
    @seyidnaali hhhhh ali
    Jordan Max
    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
    Never mind, figured it out!
    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
    @troc_maroc_twitter sorry ?
    Sameer Kashyap
    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
    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

    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) {
                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) {
                time.Sleep(3 * time.Second)
                fmt.Println("world done")
                return "world", nil

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

    Jeroen Rinzema
    Hi guys, Is it possible to return a empty object somehow?