Skip to content

Commit

Permalink
fix: exported types
Browse files Browse the repository at this point in the history
  • Loading branch information
Diizzayy committed Dec 24, 2022
1 parent bd01a2a commit 7207c06
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/runtime/composables/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,16 @@ export const useGqlHost = (host: string, client?: GqlClients) => {
host = `${initialHost}${host}`
}

return state.value?.[client].instance!.setEndpoint(host)
state.value?.[client].instance!.setEndpoint(host)
}

export const useGql = (): (<
T extends GqlOps,
R extends ReturnType<GqlSdkFuncs[T]>,
P extends Parameters<GqlSdkFuncs[T]>['0'],
> (args: { operation: T, variables?: P }) => R) &
(<
T extends GqlOps,
R extends ReturnType<GqlSdkFuncs[T]>,
P extends Parameters<GqlSdkFuncs[T]>['0'],
> (operation: T, variables?: P) => R) => {
export function useGql (): <
T extends GqlOps,
R extends ReturnType<GqlSdkFuncs[T]>,
P extends Parameters<GqlSdkFuncs[T]>['0'],
> (...args: [T, P] | [{ operation: T, variables?: P }]) => R

export function useGql () {
const state = useGqlState()
const errState = useGqlErrorState()

Expand Down

0 comments on commit 7207c06

Please sign in to comment.