You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble stitching my schema to my former API written in Youshido\GraphQL. There's been a bit of talk about this before. I found that I'm experiencing what's described in the first post of this issue: youshido-php/GraphQL#144 .
The schema is this:
typeQuery {
Foo(uuid: String): String
}
I query my new endpoint like this:
query {
Foo
}
Some process in graphql-tools, which I presume involves delegateToSchema, takes the received query and turns it into this:
... Because JSON.stringify({a: undefined}) === '{}', the undefined variable definitions get thrown out, but the variable symbols stay in the query. Youshido\GraphQL then complains that it sees these variables, but no variable values to go along with them.
{"errors": [
{"message": "Variable _uuid hasn't been submitted"}
]}
This is not a bug report, because I don't think it's clear if it's apollo/graphql-tools that need to be fixed, or Youshido\GraphQL. I personally think that if the variables are not included in the original query, they should not be in the forwarded one either. It all comes down to whether these four should be considered different or not:
I'm having trouble stitching my schema to my former API written in Youshido\GraphQL. There's been a bit of talk about this before. I found that I'm experiencing what's described in the first post of this issue: youshido-php/GraphQL#144 .
The schema is this:
I query my new endpoint like this:
Some process in graphql-tools, which I presume involves delegateToSchema, takes the received query and turns it into this:
... Because
JSON.stringify({a: undefined}) === '{}'
, the undefined variable definitions get thrown out, but the variable symbols stay in the query. Youshido\GraphQL then complains that it sees these variables, but no variable values to go along with them.This is not a bug report, because I don't think it's clear if it's apollo/graphql-tools that need to be fixed, or Youshido\GraphQL. I personally think that if the variables are not included in the original query, they should not be in the forwarded one either. It all comes down to whether these four should be considered different or not:
Possibly related: #550
The text was updated successfully, but these errors were encountered: