-
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
AS3: Remove API key parser #5157
Comments
We will also migrate towards a graph-ref-centric world. |
glasser
added a commit
that referenced
this issue
May 19, 2021
glasser
added a commit
to apollographql/apollo
that referenced
this issue
May 19, 2021
This was referenced May 19, 2021
glasser
added a commit
that referenced
this issue
May 20, 2021
glasser
added a commit
to apollographql/apollo
that referenced
this issue
May 20, 2021
glasser
added a commit
that referenced
this issue
May 26, 2021
Apollo Server shouldn't need to have deep knowledge of Apollo Studio's data model. "ID and variant" are overly precise. This PR moves us towards a world where Apollo Server only needs to be aware of the "graph ref", a string like `id@variant` (but which might end up with other spellings later). We intend to remove the API key parser in Apollo Server 3 and stop providing `graphId`/`graphVariant` to plugins and the gateway, but these remain for now. This PR: - Allows you to specify the graph ref via `APOLLO_GRAPH_REF` or `apollo: {graphRef}`. It is an error to also specify ID or variant if you specify the ref. - Makes `graphRef` available to plugins and the gateway alongside `graphId` and `graphRef`. - If you specify an API key but it does not start with `service:` and you do not specify graph ref or graph ID, it throws an error. This fixes #4640. Note that while there are other legal Apollo key formats, Apollo Server only currently works with `service:*` keys. - Switches usage reporting and schema reporting to use new protocols that specify the graph ref instead of the variant, and to print Studio URLs that use the graph ref instead of the ID and variant separately. (The old protocols didn't specify the ID because it was implied by the API key.) - The schema reporter previously used Apollo Codegen without any documentation of how it worked. Set up graphql-code-generator instead and add an npm script to regenerate the types. Part of #5157.
glasser
added a commit
that referenced
this issue
May 26, 2021
Apollo Server shouldn't need to have deep knowledge of Apollo Studio's data model. "ID and variant" are overly precise. This PR moves us towards a world where Apollo Server only needs to be aware of the "graph ref", a string like `id@variant` (but which might end up with other spellings later). We intend to remove the API key parser in Apollo Server 3 and stop providing `graphId`/`graphVariant` to plugins and the gateway, but these remain for now. This PR: - Allows you to specify the graph ref via `APOLLO_GRAPH_REF` or `apollo: {graphRef}`. It is an error to also specify ID or variant if you specify the ref. - Makes `graphRef` available to plugins and the gateway alongside `graphId` and `graphRef`. - If you specify an API key but it does not start with `service:` and you do not specify graph ref or graph ID, it throws an error. This fixes #4640. Note that while there are other legal Apollo key formats, Apollo Server only currently works with `service:*` keys. - If you specify an API key but don't specify a graph ref or ID, prints a deprecation warning telling you to set a graph ref. - Switches usage reporting and schema reporting to use new protocols that specify the graph ref instead of the variant, and to print Studio URLs that use the graph ref instead of the ID and variant separately. (The old protocols didn't specify the ID because it was implied by the API key.) - The schema reporter previously used Apollo Codegen without any documentation of how it worked. Set up graphql-code-generator instead and add an npm script to regenerate the types. Part of #5157.
glasser
added a commit
that referenced
this issue
May 26, 2021
Apollo Server shouldn't need to have deep knowledge of Apollo Studio's data model. "ID and variant" are overly precise. This PR moves us towards a world where Apollo Server only needs to be aware of the "graph ref", a string like `id@variant` (but which might end up with other spellings later). We intend to remove the API key parser in Apollo Server 3 and stop providing `graphId`/`graphVariant` to plugins and the gateway, but these remain for now. This PR: - Allows you to specify the graph ref via `APOLLO_GRAPH_REF` or `apollo: {graphRef}`. It is an error to also specify ID or variant if you specify the ref. - Makes `graphRef` available to plugins and the gateway alongside `graphId` and `graphRef`. - If you specify an API key but it does not start with `service:` and you do not specify graph ref or graph ID, it throws an error. This fixes #4640. Note that while there are other legal Apollo key formats, Apollo Server only currently works with `service:*` keys. - If you specify an API key but don't specify a graph ref or ID, prints a deprecation warning telling you to set a graph ref. - Switches usage reporting and schema reporting to use new protocols that specify the graph ref instead of the variant, and to print Studio URLs that use the graph ref instead of the ID and variant separately. (The old protocols didn't specify the ID because it was implied by the API key.) - The schema reporter previously used Apollo Codegen without any documentation of how it worked. Set up graphql-code-generator instead and add an npm script to regenerate the types. Part of #5157.
Fixed on |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently we parse a graph ID out of APOLLO_KEY if you don't set APOLLO_GRAPH_ID (or the equivalent constructor argument). This is awkward for a bunch of reasons. We should start encouraging people to set APOLLO_GRAPH_ID now, and require it in AS3 if you set APOLLO_KEY.
The text was updated successfully, but these errors were encountered: