-
Notifications
You must be signed in to change notification settings - Fork 275
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
feat(federation): respect the subgraph_graphql_validation
option
#5871
Conversation
- when `subgraph_graphql_validation` configuration option is true.
@duckki, please consider creating a changeset entry in |
CI performance tests
|
subgraph_graphql_validation
optionsubgraph_graphql_validation
option
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.
Tbh, I have a slight preference for always validating, and returning an internal error if we produced an invalid query.
@@ -3955,7 +3955,7 @@ impl TryFrom<Operation> for Valid<executable::ExecutableDocument> { | |||
document.fragments = fragments; | |||
document.operations.insert(operation); | |||
coerce_executable_values(value.schema.schema(), &mut document); | |||
Ok(document.validate(value.schema.schema())?) | |||
Ok(Valid::assume_valid(document)) |
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.
We should not do assume_valid
inside this TryFrom
implementation. If we do this we should change the impl to TryFrom<Operation> for executable::ExecutableDocument
.
JS QP doesn't seem to validate subgraph queries. So, Rust QP is taking a performance penalty (didn't measure how much). Also, this validation has never failed so far over the corpus. |
This is not urgent. We can revisit this when we work on performance. |
570ad0f
to
c10afff
Compare
Closing this to clean-up some open and aging PRs, but don't hesitate to just click the re-open button it if it's still relevant. |
subgraph_graphql_validation
configuration option is true.Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩