router
router copied to clipboard
docs: add `apollo_operation_id`
In #3586, @o0Ignition0o introduced the apollo_operation_id — a user-accessible attribute that can be fetched from the context and used to build a durable link to the Operation page in Studio. This is useful for emitting into logs or, e.g., as an attribute on trace spans for debugging purposes. We may make this available in more places in the future!
Using two other pieces of information from the graph reference (the your-graph@current option that you run your Router with), this new apollo_operation_id value can be used to generate the full URL using the following convention:
https://studio.apollographql.com/graph/{{your_graph_id}}/variant/{{your_graph_variant}}/operations?query={{apollo_operation_id}}
Where:
{{your_graph_id}}(This is the part to the left of the@sign in your "graph reference" (i.e., theyour-graphpart ofyour-graph@current){{your_graph_variant}}(This is the part to the right of the@sign in your "graph reference" (i.e., thecurrentpart ofyour-graph@current){{apollo_operation_id}}this is the value read from the context'sapollo_operation_idproperty.
No curly braces should be present in the actual URL. 😄