From 09583577237fa196d2a102af576ce48fb5d9fde7 Mon Sep 17 00:00:00 2001 From: Geoffroy Couprie Date: Wed, 27 Mar 2024 09:22:58 +0100 Subject: [PATCH 1/2] expose the operation signature in the context --- apollo-router/src/query_planner/caching_query_planner.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apollo-router/src/query_planner/caching_query_planner.rs b/apollo-router/src/query_planner/caching_query_planner.rs index d9f0bb7049..e4a15210a2 100644 --- a/apollo-router/src/query_planner/caching_query_planner.rs +++ b/apollo-router/src/query_planner/caching_query_planner.rs @@ -273,6 +273,10 @@ where "apollo_operation_id", stats_report_key_hash(usage_reporting.stats_report_key.as_str()), ); + let _ = response.context.insert( + "apollo_operation_signature", + usage_reporting.stats_report_key.clone(), + ); } response }) From decb295b3907fe9dc800e268d76d755559246c98 Mon Sep 17 00:00:00 2001 From: Geoffroy Couprie Date: Wed, 27 Mar 2024 09:24:53 +0100 Subject: [PATCH 2/2] changeset --- .changesets/feat_geal_expose_operation_signature.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changesets/feat_geal_expose_operation_signature.md diff --git a/.changesets/feat_geal_expose_operation_signature.md b/.changesets/feat_geal_expose_operation_signature.md new file mode 100644 index 0000000000..2f1c5e6bfc --- /dev/null +++ b/.changesets/feat_geal_expose_operation_signature.md @@ -0,0 +1,5 @@ +### expose the operation signature in the context ([Issue #4558](https://github.com/apollographql/router/issues/4558)) + +It is available at the key `apollo_operation_signature`. + +By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/4864 \ No newline at end of file