-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update schemaIsSubgraph
to also support non nullable _Service.sdl
#7274
Update schemaIsSubgraph
to also support non nullable _Service.sdl
#7274
Conversation
✅ Deploy Preview for apollo-server-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 26f5e70:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the tests! Would you please add a changeset (run npx changeset
)?
Co-authored-by: Trevor Scheer <trevor.scheer@gmail.com>
@trevor-scheer thanks and done, let me know if I need to rebase :) |
@patrick91 until we release this, you're welcome to use the codesandbox ci builds (from the PR comment) to test out these changes or unblock other work in the meantime. |
Fed v2 updated the subgraph spec to make _Service.sdl non-nullable. We should explain this thoroughly in our docs, test for both cases, and update a relevant recent changelog entry. Follow-up to #7274.
Fed v2 updated the subgraph spec to make `_Service.sdl` non-nullable. We should explain this thoroughly in our docs, test for both cases, and update a relevant recent changelog entry. Follow-up to #7274. Addresses #7274 (comment)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @apollo/server-integration-testsuite@4.3.1 ### Patch Changes - [#7285](#7285) [`35fa72bdd`](35fa72b) Thanks [@glasser](https://github.com/glasser)! - Adds an integration test verifying that Rover's introspection query works. This should not break any integration that passes other tests. - [#7276](#7276) [`15c912f4c`](15c912f) Thanks [@renovate](https://github.com/apps/renovate)! - Update graphql-http dependency - Updated dependencies \[[`ec28b4b33`](ec28b4b), [`322b5ebbc`](322b5eb), [`3b0ec8529`](3b0ec85)]: - @apollo/server@4.3.1 ## @apollo/server@4.3.1 ### Patch Changes - [#7313](#7313) [`ec28b4b33`](ec28b4b) Thanks [@vtipparam](https://github.com/vtipparam)! - Allow case insensitive lookup on headers. Use HeaderMap instead of plain Map for headers in expressMiddleware. - [#7311](#7311) [`322b5ebbc`](322b5eb) Thanks [@axe-me](https://github.com/axe-me)! - Export intermediate ApolloServerOptions\* types - [#7274](#7274) [`3b0ec8529`](3b0ec85) Thanks [@patrick91](https://github.com/patrick91)! - The subgraph spec has evolved in Federation v2 such that the type of `_Service.sdl` (formerly nullable) is now non-nullable. Apollo Server now detects both cases correctly in order to determine whether to: 1. install / enable the `ApolloServerPluginInlineTrace` plugin 2. throw on startup if `ApolloServerPluginSchemaReporting` should not be installed 3. warn when `ApolloServerPluginUsageReporting` is installed and configured with the `__onlyIfSchemaIsNotSubgraph` option Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Related to apollographql/apollo-federation-subgraph-compatibility#302
We found a discrepancy in how libraries implement the federation specification (
_Service.sdl
isString
in Federation 1 and isString
in Federation 2).I'm doing this PR mostly to check how easy it would be to support both specs at once, if I understood correctly the code
schemaIsSubgraph
might also be used outside Apollo Server 😊