-
Notifications
You must be signed in to change notification settings - Fork 2k
Provide new requestIsBatched field to gateway compatibility layer #7118
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
Conversation
✅ Deploy Preview for apollo-server-docs ready!
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 6ccc138:
|
@trevor-scheer Hmm. So the possible downside here is that this means you can't combine current Gateway with the version of ASGI that this would publish unless you're on v3.11 or v4.1.1, right? Is that a problem? Do we need to major bump ASGI or something? |
Maybe that can be resolved by making the field optional in ASGI? |
Optional sounds like a nice solution but I'm not sure the types will be compatible if so. We could make all of them optional? |
3474454
to
b304156
Compare
OK, publishing #7119 (v3.11.1) actually fixes the failure, but it still seems reasonable to provide the data. |
This field was added today in v3.11.0 and v4.1.0. That means that if you installed an older version of Gateway that gets its types from AS3 rather than from `@apollo/server-gateway-interface` it would suddenly start expecting this field on its GraphQLRequestContext. We fixed that problem by releasing v3.11.1 which makes the field optional. But it still seems reasonable to provide it if it's available... but we keep the field optional in the compatibility interface so that new Gateway doesn't end up requiring new Server.
b304156
to
6ccc138
Compare
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-gateway-interface@1.0.5 ### Patch Changes - [#7118](#7118) [`c835637be`](c835637) Thanks [@glasser](https://github.com/glasser)! - Provide new `GraphQLRequestContext.requestIsBatched` field to gateways, because we did add it in a backport to AS3 and the gateway interface is based on AS3. ## @apollo/server-integration-testsuite@4.1.1 ### Patch Changes - Updated dependencies \[[`c835637be`](c835637)]: - @apollo/server@4.1.1 ## @apollo/server@4.1.1 ### Patch Changes - [#7118](#7118) [`c835637be`](c835637) Thanks [@glasser](https://github.com/glasser)! - Provide new `GraphQLRequestContext.requestIsBatched` field to gateways, because we did add it in a backport to AS3 and the gateway interface is based on AS3. - Updated dependencies \[[`c835637be`](c835637)]: - @apollo/server-gateway-interface@1.0.5 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This field was added today in v3.11.0 and v4.1.0. That means that if you
installed an older version of Gateway that gets its types from AS3
rather than from
@apollo/server-gateway-interface
it would suddenlystart expecting this field on its GraphQLRequestContext.
We fixed that problem by releasing v3.11.1 which makes the field
optional. But it still seems reasonable to provide it if it's
available... but we keep the field optional in the compatibility
interface so that new Gateway doesn't end up requiring new Server.