Skip to content

Commit

Permalink
fix: respect default token config
Browse files Browse the repository at this point in the history
  • Loading branch information
Diizzayy committed Nov 20, 2022
1 parent 8da3bfb commit 274a898
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default defineNuxtModule<GqlConfig>({
? { host: v }
: { ...v, token: typeof v.token === 'string' ? { value: v.token } : v.token }, {
...clientDefaults,
...(typeof v === 'object' && typeof v.token !== 'string' && v?.token?.type === null && { token: { type: null } })
...(typeof v === 'object' && typeof v.token !== 'string' && v?.token?.type === null && { token: { ...clientDefaults.token, type: null } })
})

const runtimeHost = k === defaultClient ? process.env.GQL_HOST : process.env?.[`GQL_${k.toUpperCase()}_HOST`]
Expand Down

0 comments on commit 274a898

Please sign in to comment.