I have a peculiar situation.
I am sending mutation to 3rd party graphQL endpoint and it works great if I do it from Hasura console or from some playground, but when I do it from our server with apollo it breaks somethings.
The gql and the parameters are the same, so it is probably some additional stuff is at fault.
Thus I want to check final request with all the cookies, headers and stuff - exactly as received by 3rd party graphQL endpoint.
Is there a way to do that?
I have used middelware like the one described here Advanced HTTP networking - Apollo GraphQL Docs (with plain console.log instead of changing headers).
There are two cases. If I add middleware before link, I get following info in operation
Error: You are calling concat on a terminating link, which will have no effect
at new LinkError
at ApolloLink.concat
at createApolloClient (webpack-internal:///./lib/apolloClient.js:120:65)
at eval (webpack-internal:///./models/users.js:55:80)
....
{
link: HttpLink {
request: [Function (anonymous)],
options: {
uri: 'https://hasura-graphql-engine.be.gigs.guide/v1/graphql',
credentials: 'same-origin',
headers: [Object],
fetch: [Function]
}
}
I think both those results in combination may allow me to find out what is the problem, but I would like to know - does not apollo add some of his own headers (cache headers or something like ‘hey I’m apollo’)?