Closed lucasprins closed 8 months ago
you can create different clients for each option, to pass the options you can override the fetch function
https://genql.dev/docs/usage/create-the-client#60b057b56b1340b099732ced94b26571
Sorry but that doesn't seem very efficient, that means creating a seperate client for each mutation and query. I forked the repo locally and added a second argument to queries and mutations which is a RequestInit object, would that be a good solution maybe?
creating a client isn't an inefficient task, usually you won't have many cache tags or different revalidation parameters, typically 2 or 3
When using Next.js App Router it is needed to be able to specify additional fetch paramaters per request such as revalidation tags and cache control headers. Is this not possible currently?
https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating