-
Notifications
You must be signed in to change notification settings - Fork 272
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
Move persisted queries from preview to general availability #3914
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
### Move Persisted Queries to General Availability ([PR #3914](https://github.com/apollographql/router/pull/3914)) | ||
|
||
[Persisted Queries](https://www.apollographql.com/docs/graphos/operations/persisted-queries/) (a GraphOS Enterprise feature) is now moving to General Availability, from Preview where it has been since Apollo Router 1.25. | ||
|
||
For more information about launch stages, please see the documentation here: https://www.apollographql.com/docs/resources/product-launch-stages/ | ||
|
||
The feature is now configured with a `persisted_queries` top-level key in the YAML configuration instead of with `preview_persisted_queries`. Existing configuration files will keep working as before, only with a warning. To fix that warning, rename the configuration section like so: | ||
|
||
```diff | ||
-preview_persisted_queries: | ||
+persisted_queries: | ||
enabled: true | ||
``` | ||
|
||
By [@glasser](https://github.com/glasser) in https://github.com/apollographql/router/pull/3914 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
description: Persisted queries are no longer preview, `preview_persisted_queries` is renamed `persisted_queries` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Text chosen for consistency with 0008, though I would probably use a semicolon and add "to" after "renamed" |
||
actions: | ||
- type: move | ||
from: preview_persisted_queries | ||
to: persisted_queries |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
source: apollo-router/src/configuration/tests.rs | ||
expression: new_config | ||
--- | ||
--- | ||
persisted_queries: | ||
enabled: true | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
apq: | ||
enabled: false | ||
preview_persisted_queries: | ||
persisted_queries: | ||
enabled: true | ||
log_unknown: true | ||
safelist: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
preview_persisted_queries: | ||
enabled: true | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,7 +178,7 @@ impl LicenseEnforcementReport { | |
.name("Operation aliases limiting") | ||
.build(), | ||
ConfigurationRestriction::builder() | ||
.path("$.preview_persisted_queries") | ||
.path("$.persisted_queries") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly want to double-check my understanding that this expression is only ever applied to a YAML file that has been "migrated". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, both license enforcement and metrics are applied to |
||
.name("Persisted queries") | ||
.build(), | ||
] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ minVersion: 1.25.0 | |
|
||
<GraphOSEnterpriseRequired /> | ||
|
||
<PreviewFeature discordLink="https://discordapp.com/channels/1022972389463687228/1143901714173407342"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that there are other references to "preview" on this page, but they are loaded via components in the |
||
|
||
<PQIntro /> | ||
|
||
## Differences from automatic persisted queries | ||
|
@@ -40,21 +38,21 @@ For more information on other configuration aspects, see the [GraphOS persisted | |
|
||
The router provides four configuration options that you can combine to create the recommended [security levels](#router-security-levels). This section details each configuration option. Refer to the [security levels](#router-security-levels) section for recommended combinations. | ||
|
||
#### `preview_persisted_queries` | ||
#### `persisted_queries` | ||
|
||
This base configuration enables the feature. All other configuration options build off this one. | ||
|
||
```yaml title="router.yaml" | ||
preview_persisted_queries: | ||
persisted_queries: | ||
enabled: true | ||
``` | ||
#### `log_unknown` | ||
|
||
Adding `log_unknown: true` to `preview_persisted_queries` configures the router to log any incoming operations not preregistered to the PQL. | ||
Adding `log_unknown: true` to `persisted_queries` configures the router to log any incoming operations not preregistered to the PQL. | ||
|
||
```yaml title="router.yaml" | ||
preview_persisted_queries: | ||
persisted_queries: | ||
enabled: true | ||
log_unknown: true | ||
``` | ||
|
@@ -63,10 +61,10 @@ If used with the [`safelist`](#safelist) option, the router logs unregistered an | |
|
||
#### `safelist` | ||
|
||
Adding `safelist: true` to `preview_persisted_queries` causes the router to reject any operations that haven't been preregistered to your PQL. | ||
Adding `safelist: true` to `persisted_queries` causes the router to reject any operations that haven't been preregistered to your PQL. | ||
|
||
```yaml title="router.yaml" | ||
preview_persisted_queries: | ||
persisted_queries: | ||
enabled: true | ||
safelist: | ||
enabled: true | ||
|
@@ -85,7 +83,7 @@ Adding `require_id: true` to the `safelist` option causes the router to reject a | |
- use a full operation string rather than the operation ID | ||
|
||
```yaml title="router.yaml" | ||
preview_persisted_queries: | ||
persisted_queries: | ||
enabled: true | ||
safelist: | ||
enabled: true | ||
|
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.
@BrynCooke I just want to double-check my understanding that this expression is only ever applied to a YAML file that has been "migrated".
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.
That's correct.