Closed aspitrine closed 2 years ago
@aspitrine Thank you for raising this issue! This bug slipped through the cracks here for far too long, it was caused to a previous regression where the GraphQL operations where no longer being prepared beforehand. This in hand directly affected the usage of useAsyncGql
and the generated GqlFunctions in multi-client mode.
Hi,
I can't use multiple client with nuxt-graphql-client.
I found the error here : https://github.com/Diizzayy/nuxt-graphql-client/blob/e0a910c281fb1b0ef04a0455619031b41fcf0914/src/runtime/composables/index.ts#L293
for the purpose look at my exemple :
I have 2 client :
I create query and mutation prefixed with the client.
When they need to select the good client
So they can't work and select default value. A quick fix will be
You have the same error for generated query in https://github.com/Diizzayy/nuxt-graphql-client/blob/e0a910c281fb1b0ef04a0455619031b41fcf0914/src/context.ts#L25
the fix will be something like this
If you need more information, just ask.
Thanks for your work !