-
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
Access to the pre-calculated GraphOS query signature hash #2728
Comments
Are you referring to the straight SHA-256 of the exact operation, or the operation signature that we internally calculate via a normalization and hashing algorithm that's used for bucketing the operation into similar groups in Studio reporting? Whichever it is, I'm curious what is trying to be accomplished with it? |
The customer is asking for access to the same hash that they can see in Studio logging, so yes, the internal operation signature via normalization. They want to log this in the Router so they can trace errors in their system to the operations and logs they can view in studio |
This is the query hash that is available today |
We (Gusto) also would like access to the hash used in the URL for the operations details page. We are hoping to be able to link directly from our internal metrics and log indexing tools to the Studio page so that engineers can easily see usage data, client data and versions, and more. If y'all decide to release this either directly in the router or simply share an overview of how the algorithm works like the above, either would be appreciated! |
Fix #2728 This changeset exposes a new key in the context, `studio_operation_id`, which identifies operation you can find in studio: ``` https://studio.apollographql.com/graph/<your_graph_variant>/variant/<your_graph_variant>/operations?query=<studio_operation_id> ``` This new context key is exposed at various stages of the operation pipeline: - Execution service request - Subgraph service request - Subgraph service response - Execution service response - Supergraph service response - Router service response
Is your feature request related to a problem? Please describe.
The query hash is used by Router for operation reporting and was previously available in the Gateway
context
. In the Router, the context no longer has this value and in Rhai scripts it is not on the request to add into the context manually. This requires manually hashing thereq.body.query
param which might actually be a different hash from the one used in operation reporting due to the deduping of operation signaturesDescribe the solution you'd like
The GraphQL context in all locations has the query hash for the current operation which can then be consumed from either Rhai or coprocessors
Describe alternatives you've considered
We could just add it into the request processing in Rhai and have others add it to the context if they need it, but it is not available there either
Additional context
This info is available in the Gateway so this is a backwards compatibility issue
The text was updated successfully, but these errors were encountered: