Search code examples
graphqlapollo

How make graphql apollo query request inside controller, but not component?


How make graphql apollo query request inside controller, but not component?

In RTK query we can just use something like initiate for example, but what about apollo? Can we make request outside component somewhere on controller?


Solution

  • You can use client.query() to run a query outside of a React component. [docs]