Skip to content

Commit 54ecee7

Browse files
fix(overmind-graphql): properly fix typing issue with gql
1 parent 4fc543c commit 54ecee7

File tree

1 file changed

+3
-1
lines changed
  • packages/node_modules/overmind-graphql/src

1 file changed

+3
-1
lines changed

packages/node_modules/overmind-graphql/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { print } from 'graphql/language/printer';
88
import { DocumentNode } from 'graphql'
99
import { Socket as PhoenixSocket } from 'phoenix';
1010

11-
export { default as gql } from 'graphql-tag';
11+
import gqlTag from 'graphql-tag';
1212

1313
export interface Query<Result extends any, Payload extends any = void> extends DocumentNode {
1414
(payload: Payload): Result;
@@ -94,6 +94,8 @@ function createError(message: string) {
9494
throw new Error(`OVERMIND-GRAPHQL: ${message}`);
9595
}
9696

97+
export const gql = (literals: string | readonly string[], ...placeholders: any[]): Query<any, any> => gqlTag(literals, ...placeholders) as any
98+
9799
const _clients: { [url: string]: GraphQLClient } = {};
98100
const _subscriptions: {
99101
[query: string]: Subscription[];

0 commit comments

Comments
 (0)