refactor(types): rewritten most types
This commit is contained in:
@@ -9,8 +9,6 @@ export class ApolloProvider {
|
||||
this.watchLoading = options.watchLoading
|
||||
this.errorHandler = options.errorHandler
|
||||
this.prefetch = options.prefetch
|
||||
|
||||
this.prefetchQueries = []
|
||||
}
|
||||
|
||||
provide (key = '$apolloProvider') {
|
||||
|
||||
@@ -19,10 +19,6 @@ export class DollarApollo {
|
||||
return this.vm.$apolloProvider
|
||||
}
|
||||
|
||||
query (options) {
|
||||
return this.getClient(options).query(options)
|
||||
}
|
||||
|
||||
getClient (options = null) {
|
||||
if (!options || !options.client) {
|
||||
if (typeof this.client === 'object') {
|
||||
@@ -48,6 +44,10 @@ export class DollarApollo {
|
||||
return client
|
||||
}
|
||||
|
||||
query (options) {
|
||||
return this.getClient(options).query(options)
|
||||
}
|
||||
|
||||
watchQuery (options) {
|
||||
const observable = this.getClient(options).watchQuery(options)
|
||||
const _subscribe = observable.subscribe.bind(observable)
|
||||
|
||||
Reference in New Issue
Block a user