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
our attempt to run the same query fails with an error:
Cannot query field "isOneOf" on type "__Type".
full error with stack trace
{
"errors": [
{
"message": "Cannot query field \"isOneOf\" on type \"__Type\".",
"extensions": {
"code": "INVALID_GRAPHQL",
"stacktrace": [
"GraphQLError: Cannot query field \"isOneOf\" on type \"__Type\".",
" at Object.err (/Users/mac/Desktop/oneoff/supergraph/node_modules/@apollo/federation-internals/dist/error.js:11:32)",
" at validate (/Users/mac/Desktop/oneoff/supergraph/node_modules/@apollo/federation-internals/dist/operations.js:15:46)",
" at selectionOfNode (/Users/mac/Desktop/oneoff/supergraph/node_modules/@apollo/federation-internals/dist/operations.js:2386:13)",
" at selectionSetOfNode (/Users/mac/Desktop/oneoff/supergraph/node_modules/@apollo/federation-internals/dist/operations.js:2366:24)",
" at selectionOfNode (/Users/mac/Desktop/oneoff/supergraph/node_modules/@apollo/federation-internals/dist/operations.js:2389:19)",
" at selectionSetOfNode (/Users/mac/Desktop/oneoff/supergraph/node_modules/@apollo/federation-internals/dist/operations.js:2362:43)",
" at parseSelectionSet (/Users/mac/Desktop/oneoff/supergraph/node_modules/@apollo/federation-internals/dist/operations.js:2472:26)",
" at operationFromAST (/Users/mac/Desktop/oneoff/supergraph/node_modules/@apollo/federation-internals/dist/operations.js:2456:55)",
" at operationFromDocument (/Users/mac/Desktop/oneoff/supergraph/node_modules/@apollo/federation-internals/dist/operations.js:2448:12)",
" at /Users/mac/Desktop/oneoff/supergraph/node_modules/@apollo/gateway/dist/index.js:78:100"
]
}
}
]
}
And indeed, deep inside it fails to retrieve such field here:
Issue Description
Let's pretend we have following schema:
Nothing interesting or special here
for this schema we have single subgraph service
subgraph.mjs
both
{ __type(name: "UserWhere") { name isOneOf } }
and{ _service { sdl } }
works and returns one ofProblem
but, when we are on gateway land
supergraph.mjs
our attempt to run the same query fails with an error:
full error with stack trace
And indeed, deep inside it fails to retrieve such field here:
it returns undefined and because of that everything else fails
Link to Reproduction
https://gist.github.com/mac2000/510f1d26e9dd562a44a201983d914578
Reproduction Steps
reproduction steps
The text was updated successfully, but these errors were encountered: