I ran my test first on GraphQL API Explorer and then on Insomnia.
Unfortunately when i run it on Insomnia with the endpoint https://your-repo-name.cdn.prismic.io/graphql as it explain in the documentation i got a 403 response. (In precision i have the bearer token in the auth configurations)
After hunting for an answer for my problem, i saw some topics where the people used https://your-repo-name.prismic.io/graphql (without the .cdn so) and it's worked.
The query is now in the url with the param query
Welcome to the Prismic community, and thanks for reaching out to us.
That's the documents for graphql fetch data, although it needs some updates because of the error. We will update it soon. Are you getting any other issues?
I have same problem with 403. Always that i've made a change on a custom type i got a 403 when i tried to fetch new fields added from my project (using urql + @prismicio/client).
However in the graphql playground is working well. I've checked both callls and both have same ref.
Are you caching ref in your project? An old ref can cause a 403 error. A new ref generates and fetches data whenever you make changes in the repository. In Prismic's development kits, like @prismicio/client, every query involves two requests — one for the ref and another for the content. If you are caching the ref, it can throw a 403 error.