diff --git a/packages/vue-apollo-components/build/rollup.config.base.js b/packages/vue-apollo-components/build/rollup.config.base.js index 7c35a003..d2ea9c26 100644 --- a/packages/vue-apollo-components/build/rollup.config.base.js +++ b/packages/vue-apollo-components/build/rollup.config.base.js @@ -23,5 +23,5 @@ export default { VERSION: JSON.stringify(config.version), }), ], - external: ['apollo-client', 'apollo-link', 'graphql-tag'], + external: ['@apollo/client', 'graphql-tag'], } diff --git a/packages/vue-apollo-composable/tests/types/tsconfig.json b/packages/vue-apollo-composable/tests/types/tsconfig.json index ca1a3b27..311c8b39 100644 --- a/packages/vue-apollo-composable/tests/types/tsconfig.json +++ b/packages/vue-apollo-composable/tests/types/tsconfig.json @@ -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": [ diff --git a/packages/vue-apollo-composable/tests/types/useQuery-types.test.ts b/packages/vue-apollo-composable/tests/types/useQuery-types.test.ts index 55f90dcc..2edb036c 100644 --- a/packages/vue-apollo-composable/tests/types/useQuery-types.test.ts +++ b/packages/vue-apollo-composable/tests/types/useQuery-types.test.ts @@ -1,4 +1,4 @@ -import { OperationVariables } from "apollo-client"; +import { OperationVariables } from "@apollo/client/core"; import { useQuery } from "../../src"; import { ExampleDocument, diff --git a/packages/vue-apollo-composable/tests/types/useSubscription-types.test.ts b/packages/vue-apollo-composable/tests/types/useSubscription-types.test.ts index 0b1d19dc..a1bebaca 100644 --- a/packages/vue-apollo-composable/tests/types/useSubscription-types.test.ts +++ b/packages/vue-apollo-composable/tests/types/useSubscription-types.test.ts @@ -1,4 +1,4 @@ -import { OperationVariables } from "apollo-client"; +import { OperationVariables } from "@apollo/client/core"; import { useSubscription } from "../../src"; import { ExampleDocument, diff --git a/packages/vue-apollo-option/build/rollup.config.base.js b/packages/vue-apollo-option/build/rollup.config.base.js index 7c35a003..d2ea9c26 100644 --- a/packages/vue-apollo-option/build/rollup.config.base.js +++ b/packages/vue-apollo-option/build/rollup.config.base.js @@ -23,5 +23,5 @@ export default { VERSION: JSON.stringify(config.version), }), ], - external: ['apollo-client', 'apollo-link', 'graphql-tag'], + external: ['@apollo/client', 'graphql-tag'], } diff --git a/packages/vue-apollo-option/types/apollo-provider.d.ts b/packages/vue-apollo-option/types/apollo-provider.d.ts index 34e994f0..64ab1136 100644 --- a/packages/vue-apollo-option/types/apollo-provider.d.ts +++ b/packages/vue-apollo-option/types/apollo-provider.d.ts @@ -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, diff --git a/packages/vue-apollo-option/types/options.d.ts b/packages/vue-apollo-option/types/options.d.ts index 20e81b17..88b1211a 100644 --- a/packages/vue-apollo-option/types/options.d.ts +++ b/packages/vue-apollo-option/types/options.d.ts @@ -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 */ diff --git a/packages/vue-apollo-option/types/test/App.ts b/packages/vue-apollo-option/types/test/App.ts index befc90c3..f987e91b 100644 --- a/packages/vue-apollo-option/types/test/App.ts +++ b/packages/vue-apollo-option/types/test/App.ts @@ -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 diff --git a/packages/vue-apollo-option/types/test/Decorator.ts b/packages/vue-apollo-option/types/test/Decorator.ts index 1c5b2502..d595e680 100644 --- a/packages/vue-apollo-option/types/test/Decorator.ts +++ b/packages/vue-apollo-option/types/test/Decorator.ts @@ -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({ diff --git a/packages/vue-apollo-option/types/test/index.ts b/packages/vue-apollo-option/types/test/index.ts index 390dbfa4..a9c73c64 100644 --- a/packages/vue-apollo-option/types/test/index.ts +++ b/packages/vue-apollo-option/types/test/index.ts @@ -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' diff --git a/packages/vue-apollo-option/types/vue-apollo.d.ts b/packages/vue-apollo-option/types/vue-apollo.d.ts index 76d781d2..211ec6b1 100644 --- a/packages/vue-apollo-option/types/vue-apollo.d.ts +++ b/packages/vue-apollo-option/types/vue-apollo.d.ts @@ -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 diff --git a/packages/vue-apollo-ssr/src/index.ts b/packages/vue-apollo-ssr/src/index.ts index 25bd413b..951432c0 100644 --- a/packages/vue-apollo-ssr/src/index.ts +++ b/packages/vue-apollo-ssr/src/index.ts @@ -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 } diff --git a/packages/vue-apollo-ssr/tsconfig.json b/packages/vue-apollo-ssr/tsconfig.json index 3fb6adbc..5cd02525 100644 --- a/packages/vue-apollo-ssr/tsconfig.json +++ b/packages/vue-apollo-ssr/tsconfig.json @@ -3,6 +3,7 @@ "target": "es5", "module": "commonjs", "sourceMap": true, + "skipLibCheck": true }, "include": [ "src/**/*",