Search code examples
node.jsgraphqlapollo

Apollo Graphql: Replaying query


I got a use case where I need to replay a query, this needs to be done for repopulating all caches when there is an updated data.

or

Is there a way to call a query from inside the apollo graphql server?


Solution

  • You can store the incoming request - headers, body etc. in a variable and then when all the functions have finished executing, fire that same request using some axios/fetch to your own server.