πŸ‘€ Our most exciting product launch yet πŸš€ Join us May 8th for Sanity Connect

Can You Hook the GraphQL API Up to Something Like Apollo?

2 replies
Last updated: Feb 25, 2021
Can you hook the graphql api up to something like apollo in order to access sanity with graphql in the same way that you can access it in gatsby but instead in NextJS? Or in any other way for that matter? And is it possible to do queries and mutations via the graphql api?
Feb 25, 2021, 4:58 PM
Yes it's possible to use graphql api with next.js (or any other framework) but you can't use mutations via the graphql api
https://www.sanity.io/docs/graphql#mutations-fa863fdd4c6a
Feb 25, 2021, 5:30 PM
and you can use any client you want, even native fetch or axios
Feb 25, 2021, 5:37 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?