We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34c5b09 commit 742d003Copy full SHA for 742d003
src/vue/index.ts
@@ -1,12 +1,16 @@
1
import _Vue from 'vue'
2
import {DocumentNode} from "graphql";
3
4
+interface DefinitionInterface {
5
+ queries: { [key: string]: DocumentNode };
6
+ mutations: { [key: string]: DocumentNode };
7
+ subscriptions: { [key: string]: DocumentNode };
8
+}
9
+
10
export interface VueGraphQLInjectOptions {
11
definition: { [key: string]: DocumentNode };
12
}
13
-export function VueGraphQLInject(Vue: typeof _Vue, options: VueGraphQLInjectOptions): void{
- Vue.prototype.$gql = (): { operations: { [key: string]: DocumentNode } } => ({
- operations: options.definition
- })
14
+export function VueGraphQLInject(Vue: typeof _Vue, options: VueGraphQLInjectOptions): void {
15
+ Vue.prototype.$gql = options.definition
16
0 commit comments