fix: more updates to apollo-client 3
This commit is contained in:
@@ -23,5 +23,5 @@ export default {
|
||||
VERSION: JSON.stringify(config.version),
|
||||
}),
|
||||
],
|
||||
external: ['apollo-client', 'apollo-link', 'graphql-tag'],
|
||||
external: ['@apollo/client', 'graphql-tag'],
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true
|
||||
// "strict": true // TODO: this should be enabled, but src is broken with strict
|
||||
},
|
||||
"include": [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { OperationVariables } from "apollo-client";
|
||||
import { OperationVariables } from "@apollo/client/core";
|
||||
import { useQuery } from "../../src";
|
||||
import {
|
||||
ExampleDocument,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { OperationVariables } from "apollo-client";
|
||||
import { OperationVariables } from "@apollo/client/core";
|
||||
import { useSubscription } from "../../src";
|
||||
import {
|
||||
ExampleDocument,
|
||||
|
||||
@@ -23,5 +23,5 @@ export default {
|
||||
VERSION: JSON.stringify(config.version),
|
||||
}),
|
||||
],
|
||||
external: ['apollo-client', 'apollo-link', 'graphql-tag'],
|
||||
external: ['@apollo/client', 'graphql-tag'],
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
import Vue, { AsyncComponent } from 'vue'
|
||||
import { ApolloClient } from 'apollo-client'
|
||||
import { ApolloClient } from '@apollo/client/core'
|
||||
import {
|
||||
VueApolloComponentOptions,
|
||||
WatchLoading,
|
||||
|
||||
+3
-9
@@ -1,19 +1,13 @@
|
||||
import Vue from 'vue'
|
||||
import {
|
||||
WatchQueryOptions,
|
||||
OperationVariables,
|
||||
MutationOptions,
|
||||
SubscriptionOptions,
|
||||
SubscribeToMoreOptions,
|
||||
ObservableQuery,
|
||||
NetworkStatus,
|
||||
ApolloQueryResult,
|
||||
ApolloError
|
||||
} from 'apollo-client'
|
||||
import { FetchResult } from 'apollo-link'
|
||||
import { ServerError, ServerParseError } from 'apollo-link-http-common'
|
||||
import { DocumentNode, GraphQLError } from 'graphql'
|
||||
import { DeepApplyThisType } from './utils'
|
||||
} from '@apollo/client/core'
|
||||
import { DocumentNode } from 'graphql'
|
||||
// import { DeepApplyThisType } from './utils'
|
||||
|
||||
/* Component options */
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// this example src is https://github.com/Akryum/vue-apollo-example
|
||||
import gql from 'graphql-tag'
|
||||
import Vue from 'vue'
|
||||
import { OperationVariables, ApolloQueryResult, ApolloError } from 'apollo-client'
|
||||
import { VueApolloQueryDefinition, VueApolloSubscribeToMoreOptions } from '../options'
|
||||
import { OperationVariables, ApolloQueryResult } from '@apollo/client/core'
|
||||
import { VueApolloQueryDefinition } from '../options'
|
||||
import { DocumentNode } from 'graphql'
|
||||
|
||||
const pageSize = 10
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, Vue } from 'vue-property-decorator'
|
||||
import gql from 'graphql-tag'
|
||||
import { OperationVariables } from 'apollo-client'
|
||||
import { OperationVariables } from '@apollo/client/core'
|
||||
import { VueApolloComponentOptions } from '../options'
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
|
||||
import 'isomorphic-fetch'
|
||||
import { ApolloClient } from 'apollo-client'
|
||||
import { HttpLink } from 'apollo-link-http'
|
||||
import { ApolloClient, HttpLink } from '@apollo/client/core'
|
||||
|
||||
import VueApollo from '../index'
|
||||
import App from './App'
|
||||
|
||||
+4
-7
@@ -8,17 +8,14 @@ import {
|
||||
MutationOptions,
|
||||
SubscriptionOptions,
|
||||
OperationVariables,
|
||||
} from 'apollo-client'
|
||||
import { FetchResult } from 'apollo-link'
|
||||
import { Observable } from 'apollo-client/util/Observable'
|
||||
import { ApolloProvider, VueApolloComponent } from './apollo-provider'
|
||||
FetchResult,
|
||||
} from '@apollo/client/core'
|
||||
import { Observable } from '@apollo/client/utilities/observables/Observable'
|
||||
import { ApolloProvider } from './apollo-provider'
|
||||
import {
|
||||
VueApolloQueryDefinition,
|
||||
VueApolloSubscriptionDefinition,
|
||||
WatchLoading,
|
||||
ErrorHandler,
|
||||
} from './options'
|
||||
import { GraphQLError } from 'graphql'
|
||||
|
||||
export class VueApollo extends ApolloProvider implements PluginObject<{}>{
|
||||
[key: string]: any
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as serializeJs from 'serialize-javascript'
|
||||
import ApolloClient from 'apollo-client'
|
||||
import { ApolloClient } from '@apollo/client/core'
|
||||
|
||||
export type ApolloClients = { [key: string]: ApolloClient<any> }
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"sourceMap": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
|
||||
Reference in New Issue
Block a user