Skip to content

nk-coding/graphql-mesh-supergraph-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL mesh supergraph bug

Getting started

npm install
npm start

Reproduce the bug

  1. Open the browser and go to http://localhost:4000/graphql
  2. Run the following query:
    query {
        products(first: 1) {
            id
            name
            discounts {
                id
            }
            categories {
                id
                discounts {
                    id
                }
            }
        }
    }
  3. You will receive the following error:
    {
        "data": {
            "products": [
            null
            ]
        },
        "errors": [
            {
                "message": "Cannot return null for non-nullable field Category.discounts.",
                "path": [
                    "products",
                    0,
                    "categories",
                    0,
                    "discounts"
                ]
            }
        ]
    }
  4. Interestingly, the following query works:
        query {
            products(first: 1) {
                id
                name
                discounts {
                    id
                }
                categories {
                id
                    test: discounts {
                        id
                    }
                }
            }
        }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published