according to rhai API document. (Rhai Script API Reference - Apollo GraphQL Docs)
‘request.body.query’ is modifiable in rhai supergraph_service function.
so, I modified ‘request.body.query’ like this.
fn supergraph_service(service) {
service.map_request(|request| {
print(${request.body.query}
);
request.body.query=“query invalid { _typnam }}”;
print(${request.body.query}
);
});
}
but, just ‘request.body.query’ is modified locally(in super_graph function only), subgraph query is still not changed.
Why not changed query in subgraph?