-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No actionable error message on locally missing subgraph type (supergraph compose
)
#42
Comments
@EverlastingBugstopper Thoughts? I know we've tweaked some of this functionality recently. Should we move this into |
Possibly should move to i have a reproduction repo here that emits the following error message: $ npm run start
> [email protected] start
> npm run compile && node ./dist/index.js
> [email protected] compile
> tsc
{
errors: [
GraphQLError: [a] Unknown type Uri
at Object.err (/home/avery/work/fed-repro/node_modules/@apollo/federation-internals/dist/error.js:11:87)
at /home/avery/work/fed-repro/node_modules/@apollo/federation-internals/dist/federation.js:593:25
at Array.map (<anonymous>)
at addSubgraphToError (/home/avery/work/fed-repro/node_modules/@apollo/federation-internals/dist/federation.js:585:61)
at buildSubgraph (/home/avery/work/fed-repro/node_modules/@apollo/federation-internals/dist/federation.js:434:19)
at Subgraphs.add (/home/avery/work/fed-repro/node_modules/@apollo/federation-internals/dist/federation.js:530:99)
at subgraphsFromServiceList (/home/avery/work/fed-repro/node_modules/@apollo/federation-internals/dist/federation.js:509:23)
at composeServices (/home/avery/work/fed-repro/node_modules/@apollo/composition/dist/compose.js:35:75)
at main (/home/avery/work/fed-repro/dist/index.js:24:46)
at Object.<anonymous> (/home/avery/work/fed-repro/dist/index.js:26:13) {
path: undefined,
locations: undefined,
extensions: [Object]
}
]
} IIRC we only check for |
This could also be a bug in Federation 0.x composition. I wonder if this is improved in Federation 2? |
this is using federation 2 i believe? |
This is (mostly) fixed in Rover 0.4.5. Output looks like this for fed 1 and fed 2 respectively. fed1 output is still a bit janky, i'm thinking we'll need to update the harmonizer-js lib to spit out
|
supergraph compose
fails with no actionable error messages when a subgraph depends on a type that it does not define, but which some other subgraph does.For example, given
a.graphql
:and
b.graphql
:and a
supergraph.yml
config file pointing at these files:then we get:
This leads to the end-developer needing to perform a binary search, which is hard with an SDL because you have to be careful not to remove types that are depended on by other types, otherwise you get completely different errors.
The text was updated successfully, but these errors were encountered: