I dont get extensions in response when using apollo server and graphql-tools

Viewed 674

I have graphql server that serve as a gateway to serval grapql api servers and for some reason I dont get the custom fields inside the extensions in the response.

I am using graphql-tools mergeSchema function with apollo-server library.

const expressApp = express();

const server = new ApolloServer({
       schema,
       tracing: true,
       cacheControl: true,
    });

my response look something like that:

 "data":{....},
 "extensions": {
    "tracing": {}
    "cacheControl":{}
 }

If I query the graphql api without my gateway I am getting the custom fields in the extension part inside the response, But it seems that the apollo-server library or graphql-tools emit the custom fields from the extensions

Note: I tried to use the formatResponse like the answer below without success to get the custom fields in the extensions -

`Extensions` field not shown in apollo graphql response data

Thanks for any kind of help!!

0 Answers
Related