-
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
feat(coprocessor): add conditions on coprocessor stages #5557
Conversation
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
CI performance tests
|
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Edward Huang <edward.huang@apollographql.com>
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.
Approved!
But please can you follow up by moving the selectors to src/configuration/selectors
.
Also it'd be good to have a separate file for each type of selector, so we would end up with:
src/configuration/selectors/router.rs
src/configuration/selectors/supergraph.rs
etc.
@@ -4892,8 +4902,8 @@ expression: "&schema" | |||
"description": "The trace ID of the request.", | |||
"properties": { | |||
"trace_id": { | |||
"$ref": "#/definitions/TraceIdFormat2", |
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.
Looks like there is non-determinism here. I did a check and there are two TraceIdFormat enums. We need to unify them. This PR didn't cause this issue, I think it was my last one.
Adding support of conditions on coprocessor stages (except for
Execution
service) based on existing conditions we already have in the router for custom telemetry. Including usage of existing selectorsExample if you would like to execute a coprocessor on supergraph response only on primary response and not subscription events for example:
or another example to not execute the coprocessor at all if it's a subscription:
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. ↩