gloo icon indicating copy to clipboard operation
gloo copied to clipboard

[GraphQL] Mutations don't work in stitched schemas

Open asayah opened this issue 2 years ago • 0 comments

Gloo Edge Version

1.13.x (beta)

Kubernetes Version

No response

Describe the bug

Mutations don't work in stitched schemas. use the following example: https://github.com/asayah/gloo-graphql-example/blob/main/kube/labs/2-declarative/2-mutation-gql.yaml

apply the manifests in lab3 and use the following mutation:

mutation post($blog : BlogInput) {
    postBlog(blogInput: $blog) {
        id
    }
}

with the following vars

{
  "blog": {
    "id": 7,
    "content": "using mutation from stitched",
    "title": "stitched ",
    "user": {
        "username": "cguillot21"
    }
  }
}

it throws an error

{
    "data": {
        "postBlog": null
    },
    "errors": [
        {
            "message": "default resolver: no value for field postBlog found in parent null",
            "locations": [
                {
                    "line": 3,
                    "column": 5
                }
            ]
        }
    ]
}

even if the mutation exist (checked status field of the virtual service)

ps: this works when not using the stitched schema ( routing to https://github.com/asayah/gloo-graphql-example/blob/main/kube/labs/2-declarative/2-mutation-gql.yaml directly)

Steps to reproduce the bug

described above

Expected Behavior

working

Additional Context

No response

asayah avatar Sep 09 '22 01:09 asayah