Skip to content

Commit

Permalink
feat: try better async query
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Klesse committed Sep 3, 2024
1 parent eff5a5c commit cb6556d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/runtime/composables/gql-async-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ export async function gqlAsyncQuery<T = any>(method: string, options: IGraphQLOp
};
const fields = config.fields as unknown as string[];

// check if config.variables is a function
if (typeof config.variables === 'function') {
config.variables = config.variables();
}

if (config.log) {
console.debug('gqlQuery::fields ', fields);
console.debug('gqlQuery::variables ', config.variables);
Expand Down

0 comments on commit cb6556d

Please sign in to comment.