You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Subgraphs now can see why particular fields were
requested. This data is provided with request to subgraph
in the body.extensions.whoRequestedFields path. Example:
{
"query": "{accounts {__typename ... on User {some {__typename id}}}}",
"extensions": {
"whoRequestedFields": [
{
"typeName": "User",
"fieldName": "id",
"requestedBySubgraphs": ["id-2"],
"reasonIsKey": true
}, {
"typeName": "User",
"fieldName": "some",
"requestedByUser": true
}, {
"typeName": "User",
"fieldName": "id",
"requestedByUser": true
}, {
"typeName": "Query",
"fieldName": "accounts",
"requestedByUser": true
}
]
}
}
This can be enabled via configuration of router.
Disabled by default. Always ignored for introspection queries.
Copy file name to clipboardExpand all lines: router/pkg/config/config.schema.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2780,6 +2780,11 @@
2780
2780
"default": false,
2781
2781
"description": "Disables variables renaming during normalization. This option could have a negative impact on planner cache hits."
2782
2782
},
2783
+
"propagate_who_requested_fields": {
2784
+
"type": "boolean",
2785
+
"default": false,
2786
+
"description": "Enables sending to upstream subgraphs (only) the \"whoRequestedFields\" extension that explains why each field was requested. This flag does not expose the data to clients."
0 commit comments