-
Notifications
You must be signed in to change notification settings - Fork 283
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
Set up stubs for SchemaBlueprint #6772
Conversation
@tninesling, please consider creating a changeset entry in |
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: 1fb6886890b24bf2b93b82cb |
…chema, and hooks that return GraphQLError[] in JS are represented as Result<(), FederationError> instead of Option<FederationError> to better indicate success/failure and enable ? chaining
General question: should we be operating on |
Begin porting blueprints from JS. The JS version extends FederationBlueprint from SchemaBlueprint. With this setup, we'll have to call the DefaultBlueprint from the FederationBlueprint in lieu of
super
.Omitted
validationRules(): readonly SDLValidationRule[]
because apollo-rs doesn't allow passing in a set of rules to validate in the same way as graphql-js. Additionally, type signatures usingGraphQLError
orGraphQLError[]
useFederationError
, which can represent multiple errors. The JS code marks success with an empty error array, so I've usedResult<(), FederationError>
forGraphQLError[]
.JS SchemaBlueprint: https://github.com/apollographql/federation/blob/main/internals-js/src/definitions.ts#L891
JS FederationBlueprint: https://github.com/apollographql/federation/blob/main/internals-js/src/federation.ts#L1549
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩