From 13c522f659f8e0b7aeab7890957553b871826815 Mon Sep 17 00:00:00 2001 From: Jake Ho Date: Wed, 24 Jan 2018 11:45:30 +0800 Subject: [PATCH 1/2] fix TypeScript error when multiple clients are used --- types/vue-apollo.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/vue-apollo.d.ts b/types/vue-apollo.d.ts index 87007eb6..c56b10c3 100644 --- a/types/vue-apollo.d.ts +++ b/types/vue-apollo.d.ts @@ -21,7 +21,7 @@ type VueApolloOptions = { export class VueApollo implements PluginObject<{}> { [key: string]: any; install: PluginFunction<{}>; - constructor (options: { defaultClient: ApolloClient<{}>, defaultOptions?: VueApolloOptions }); + constructor (options: { defaultClient: ApolloClient<{}>, defaultOptions?: VueApolloOptions, clients: { [key: string]:any } }); static install(pVue: typeof Vue, options?:{} | undefined): void; } From 7be557987c8c87d4455fab8c80fb47eb9592de8f Mon Sep 17 00:00:00 2001 From: Jake Ho Date: Wed, 31 Jan 2018 09:40:56 +0800 Subject: [PATCH 2/2] make the clients parameter optional and use the 'ApolloClient' type --- types/vue-apollo.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/vue-apollo.d.ts b/types/vue-apollo.d.ts index c56b10c3..cd978483 100644 --- a/types/vue-apollo.d.ts +++ b/types/vue-apollo.d.ts @@ -21,7 +21,7 @@ type VueApolloOptions = { export class VueApollo implements PluginObject<{}> { [key: string]: any; install: PluginFunction<{}>; - constructor (options: { defaultClient: ApolloClient<{}>, defaultOptions?: VueApolloOptions, clients: { [key: string]:any } }); + constructor (options: { defaultClient: ApolloClient<{}>, defaultOptions?: VueApolloOptions, clients?: { [key: string]: ApolloClient<{}> } }); static install(pVue: typeof Vue, options?:{} | undefined): void; }