Skip to content

Commit

Permalink
fix: more updates to apollo-client 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Oct 17, 2020
1 parent aa5880c commit fae0229
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 27 deletions.
2 changes: 1 addition & 1 deletion packages/vue-apollo-components/build/rollup.config.base.js
Expand Up @@ -23,5 +23,5 @@ export default {
VERSION: JSON.stringify(config.version),
}),
],
external: ['apollo-client', 'apollo-link', 'graphql-tag'],
external: ['@apollo/client', 'graphql-tag'],
}
1 change: 1 addition & 0 deletions packages/vue-apollo-composable/tests/types/tsconfig.json
Expand Up @@ -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": [
Expand Down
@@ -1,4 +1,4 @@
import { OperationVariables } from "apollo-client";
import { OperationVariables } from "@apollo/client/core";
import { useQuery } from "../../src";
import {
ExampleDocument,
Expand Down
@@ -1,4 +1,4 @@
import { OperationVariables } from "apollo-client";
import { OperationVariables } from "@apollo/client/core";
import { useSubscription } from "../../src";
import {
ExampleDocument,
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-apollo-option/build/rollup.config.base.js
Expand Up @@ -23,5 +23,5 @@ export default {
VERSION: JSON.stringify(config.version),
}),
],
external: ['apollo-client', 'apollo-link', 'graphql-tag'],
external: ['@apollo/client', 'graphql-tag'],
}
2 changes: 1 addition & 1 deletion 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,
Expand Down
12 changes: 3 additions & 9 deletions 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 */

Expand Down
4 changes: 2 additions & 2 deletions 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
Expand Down
2 changes: 1 addition & 1 deletion 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({
Expand Down
3 changes: 1 addition & 2 deletions 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'
Expand Down
11 changes: 4 additions & 7 deletions packages/vue-apollo-option/types/vue-apollo.d.ts
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 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<any> }

Expand Down
1 change: 1 addition & 0 deletions packages/vue-apollo-ssr/tsconfig.json
Expand Up @@ -3,6 +3,7 @@
"target": "es5",
"module": "commonjs",
"sourceMap": true,
"skipLibCheck": true
},
"include": [
"src/**/*",
Expand Down

0 comments on commit fae0229

Please sign in to comment.