11import Vue , { PluginObject , PluginFunction } from 'vue' ;
2- import { ApolloClient , ObservableQuery } from 'apollo-client' ;
2+ import { ApolloClient , ObservableQuery , ApolloQueryResult } from 'apollo-client' ;
3+ import { FetchResult } from 'apollo-link' ;
34import { Observable } from 'apollo-client/util/Observable' ;
45import { ApolloProvider , VueApolloComponent } from './apollo-provider'
56import {
@@ -40,11 +41,6 @@ export interface SmartQuery<V> extends SmartApollo<V> {
4041export interface SmartSubscription < V > extends SmartApollo < V > {
4142}
4243
43- export declare type QueryResult < T > = {
44- data : T ;
45- errors ?: GraphQLError [ ] ;
46- } ;
47-
4844export interface DollarApollo < V > {
4945 vm : V ;
5046 queries : Record < string , SmartQuery < V > > ;
@@ -57,9 +53,9 @@ export interface DollarApollo<V> {
5753 /* writeonly */ skipAllSubscriptions : boolean ;
5854 /* writeonly */ skipAll : boolean ;
5955
60- query < R = any > ( options : VueApolloQueryOptions < V , R > ) : Promise < QueryResult < R > > ;
61- mutate < R = any > ( options : VueApolloMutationOptions < V , R > ) : Promise < QueryResult < R > > ;
62- subscribe < R = any > ( options : VueApolloSubscriptionOptions < V , R > ) : Observable < R > ;
56+ query < R = any > ( options : VueApolloQueryOptions < V , R > ) : Promise < ApolloQueryResult < R > > ;
57+ mutate < R = any > ( options : VueApolloMutationOptions < V , R > ) : Promise < FetchResult < R > > ;
58+ subscribe < R = any > ( options : VueApolloSubscriptionOptions < V , R > ) : Observable < FetchResult < R > > ;
6359
6460 addSmartQuery < R = any > ( key : string , options : VueApolloQueryOptions < V , R > ) : SmartQuery < V > ;
6561 addSmartSubscription < R = any > ( key : string , options : VueApolloSubscriptionOptions < V , R > ) : SmartSubscription < V > ;
0 commit comments