-
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
v4.2 regression: variables: null
(etc) should be allowed
#7200
Comments
This is the error message when i
|
The issue seems to be that rover is passing I am able to intercept the POST request through ngrok, then manually change the |
This is caused by the 4.2.0 release of @apollo/server: https://github.com/apollographql/apollo-server/releases/tag/%40apollo%2Fserver%404.2.0 |
Please remove |
Thanks all for all of the wonderful context on this issue. I'm going to transfer it to the |
rover dev
not working with Apollo Server 4 subgraphvariables: null
(etc) should be allowed
Right, this was an unintentional regression in v4.2. We added some reasonable type validation in that change but banning |
In v4.2.0 (#7171) we changed POST handling to be stricter if `operationName`, `variables`, or `extensions` were provided with a surprising data type. This was intended to pass more of the optional recommendations of the GraphQL Over HTTP spec as tested by the graphql-http audit suite. However, we were overzealous and also banned providing these parameters as an explicit `null`, which is documented by the spec as legitimate. (And some clients, such as FIXME, actually send `variables: null` in practice.) We added explicit tests for this to the `graphql-http` test suite (graphql/graphql-http#28) and this commit allows these `null`s again. Fixes #7200.
In v4.2.0 (#7171) we changed POST handling to be stricter if `operationName`, `variables`, or `extensions` were provided with a surprising data type. This was intended to pass more of the optional recommendations of the GraphQL Over HTTP spec as tested by the graphql-http audit suite. However, we were overzealous and also banned providing these parameters as an explicit `null`, which is documented by the spec as legitimate. (And some clients, such as FIXME, actually send `variables: null` in practice.) We added explicit tests for this to the `graphql-http` test suite (graphql/graphql-http#28) and this commit allows these `null`s again. Fixes #7200.
In v4.2.0 (#7171) we changed POST handling to be stricter if `operationName`, `variables`, or `extensions` were provided with a surprising data type. This was intended to pass more of the optional recommendations of the GraphQL Over HTTP spec as tested by the graphql-http audit suite. However, we were overzealous and also banned providing these parameters as an explicit `null`, which is documented by the spec as legitimate. (And some clients, such as FIXME, actually send `variables: null` in practice.) We added explicit tests for this to the `graphql-http` test suite (graphql/graphql-http#28) and this commit allows these `null`s again. Fixes #7200.
Description
When running
rover dev
on a subgraph using Apollo Server 4, I get error[E004]
.Steps to reproduce
main
branch, runnpm i
andnpm start
.rover dev --url http://localhost:4002 --name users
.main
branch uses Apollo Server 3.Now let's try Apollo Server 4.
upgrade/as4
branch.npm i
andnpm start
rover dev --url http://localhost:4002 --name users
.Expected result
Rover dev works correctly, as in the first AS3 example. The local router runs, able to query the router through Sandbox on port 3000.
Actual result
Running
rover subgraph introspect http://localhost:4002/
gets me:Environment
Rover Info:
Version: 0.10.0
Install Location: /Users/michelle-apollo/.rover/bin/rover
OS: Mac OS 11.6.4 [64-bit]
Shell: /bin/zsh
The text was updated successfully, but these errors were encountered: