Skip to content

Commit

Permalink
fix: ensure clearing scanned client gql operations
Browse files Browse the repository at this point in the history
  • Loading branch information
Diizzayy committed Nov 23, 2023
1 parent 63836c9 commit 7a67bd9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ async function prepareOperations (ctx: GqlContext) {
return name.value
})

if (ctx.clientOps?.[client]) {
ctx.clientOps[client] = []
}

for (const op of operations) {
if (ctx.clientOps?.[client]?.includes(op)) { continue }

Expand Down
2 changes: 1 addition & 1 deletion src/runtime/composables/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { unref, isRef, reactive } from 'vue'
import type { Ref } from 'vue'
import type { AsyncData, AsyncDataOptions } from 'nuxt/dist/app/composables'
import type { ClientError } from 'graphql-request'
import { KeysOf, PickFrom } from 'nuxt/dist/app/composables/asyncData'
import type { KeysOf, PickFrom } from 'nuxt/dist/app/composables/asyncData'
import type { GqlState, GqlConfig, GqlError, TokenOpts, OnGqlError, GqlStateOpts } from '../../types'
// @ts-ignore
import { GqlSdks, GqClientOps } from '#gql'
Expand Down

0 comments on commit 7a67bd9

Please sign in to comment.