apollo icon indicating copy to clipboard operation
apollo copied to clipboard

`clientId` is not working in `useAsyncQuery` when passed as the third argument

Open AnotiaWang opened this issue 8 months ago • 5 comments

Environment

Describe the bug

When passing clientId as the third param to useAsyncQuery, clientId is not actually set before performing the request.

Expected behaviour

clientId should be properly set

Reproduction

Just pass clientId as the third param when calling useAsyncQuery.

const clientId = ''
const result = await useAsyncQuery<API.UploadImagesQuery>(
  UploadImagesDocument,
  { /** custom variables here */ },
  clientId,
)

Additional context

I had a look at the code. In prep function, only the first and second member of args is checked, maybe this is the problem.

https://github.com/nuxt-modules/apollo/blob/042c15f21b9bbe449c6763d19520d21d44e51c70/src/runtime/composables.ts#L44C98-L44C98

Logs

No response

AnotiaWang avatar Nov 01 '23 03:11 AnotiaWang