Skip to content

Commit

Permalink
Latest beta
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilkisiela committed Nov 21, 2019
1 parent e0b20d7 commit 6bcecf2
Show file tree
Hide file tree
Showing 44 changed files with 59 additions and 53 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@
"shelljs": "0.8.3",
"tsickle": "0.37.1",
"typescript": "3.5.3"
},
"resolutions": {
"@apollo/client": "3.0.0-beta.12"
}
}
4 changes: 2 additions & 2 deletions packages/apollo-angular-link-headers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
},
"peerDependencies": {
"@angular/common": "^6.0.0 || ^7.0.0 || ^8.0.0",
"@apollo/client": "^3.0.0-beta.0"
"@apollo/client": "^3.0.0-beta.12"
},
"devDependencies": {
"@angular/common": "8.2.13",
"@angular/core": "8.2.13",
"@apollo/client": "3.0.0-beta.1",
"@apollo/client": "3.0.0-beta.12",
"@types/jest": "24.0.23",
"graphql": "14.5.8",
"jest": "24.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular-link-headers/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {HttpHeaders} from '@angular/common/http';
import {ApolloLink, Operation, NextLink} from '@apollo/client/common';
import {ApolloLink, Operation, NextLink} from '@apollo/client/core';

export const httpHeaders = () => {
return new ApolloLink((operation: Operation, forward: NextLink) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular-link-headers/tests/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ApolloLink, execute, Observable, gql} from '@apollo/client/common';
import {ApolloLink, execute, Observable, gql} from '@apollo/client/core';
import {HttpHeaders} from '@angular/common/http';

import {httpHeaders} from '../src';
Expand Down
6 changes: 3 additions & 3 deletions packages/apollo-angular-link-http-batch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
"peerDependencies": {
"@angular/common": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
"@angular/core": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
"@apollo/client": "^3.0.0-beta.0",
"@apollo/client": "^3.0.0-beta.12",
"graphql": ">=0.11.0 <0.14.0 || ^14.0.0"
},
"dependencies": {
"apollo-angular-link-http-common": "~2.0.0-alpha.0",
"apollo-link-batch": "^1.1.2"
"apollo-link-batch": "^2.0.0-beta.0"
},
"devDependencies": {
"@angular/animations": "8.2.13",
Expand All @@ -39,7 +39,7 @@
"@angular/platform-browser": "8.2.13",
"@angular/platform-browser-dynamic": "8.2.13",
"@angular/platform-server": "8.2.13",
"@apollo/client": "3.0.0-beta.1",
"@apollo/client": "3.0.0-beta.12",
"@types/jest": "24.0.23",
"graphql": "14.5.8",
"jest": "24.9.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Observable as LinkObservable,
Operation,
FetchResult,
} from '@apollo/client/common';
} from '@apollo/client/core';
import {BatchLink, BatchHandler} from 'apollo-link-batch';
import {print} from 'graphql';
import {
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion packages/apollo-angular-link-http-batch/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Operation} from '@apollo/client/common';
import {Operation} from '@apollo/client/core';
import {Options} from 'apollo-angular-link-http-common';

export type BatchOptions = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
HttpClientTestingModule,
HttpTestingController,
} from '@angular/common/http/testing';
import {execute, gql, ApolloLink, Operation} from '@apollo/client/common';
import {execute, gql, ApolloLink, Operation} from '@apollo/client/core';

import {HttpBatchLink} from '../src/HttpBatchLink';

Expand Down
4 changes: 2 additions & 2 deletions packages/apollo-angular-link-http-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"peerDependencies": {
"@angular/core": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
"@angular/common": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
"@apollo/client": "^3.0.0-beta.0",
"@apollo/client": "^3.0.0-beta.12",
"graphql": ">=0.11.0 <0.14.0 || ^14.0.0"
},
"devDependencies": {
Expand All @@ -35,7 +35,7 @@
"@angular/platform-browser": "8.2.13",
"@angular/platform-browser-dynamic": "8.2.13",
"@angular/platform-server": "8.2.13",
"@apollo/client": "3.0.0-beta.1",
"@apollo/client": "3.0.0-beta.12",
"@types/jest": "24.0.23",
"graphql": "14.5.8",
"jest": "24.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular-link-http-common/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {HttpHeaders} from '@angular/common/http';
import {Operation} from '@apollo/client/common';
import {Operation} from '@apollo/client/core';

export type Headers = HttpHeaders | {[header: string]: string | string[]};

Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular-link-http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Options, this one will be used.
```js
import {HttpLinkModule, HttpLink} from 'apollo-link-http';
import {ApolloModule, Apollo} from 'apollo-angular';
import {InMemoryCache} from '@apollo/client/common';
import {InMemoryCache} from '@apollo/client/core';
import {HttpClientModule} from '@angular/common/http';

@NgModules({
Expand Down
4 changes: 2 additions & 2 deletions packages/apollo-angular-link-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"peerDependencies": {
"@angular/core": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
"@angular/common": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
"@apollo/client": "^3.0.0-beta.0",
"@apollo/client": "^3.0.0-beta.12",
"graphql": ">=0.11.0 <0.14.0 || ^14.0.0"
},
"dependencies": {
Expand All @@ -39,7 +39,7 @@
"@angular/platform-browser": "8.2.13",
"@angular/platform-browser-dynamic": "8.2.13",
"@angular/platform-server": "8.2.13",
"@apollo/client": "3.0.0-beta.1",
"@apollo/client": "3.0.0-beta.12",
"@types/jest": "24.0.23",
"apollo-angular": "2.0.0-alpha.0",
"graphql": "14.5.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular-link-http/src/HttpLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Observable as LinkObservable,
Operation,
FetchResult,
} from '@apollo/client/common';
} from '@apollo/client/core';
import {print} from 'graphql';
import {
fetch,
Expand Down
3 changes: 2 additions & 1 deletion packages/apollo-angular-link-http/tests/HttpLink.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {
HttpClientTestingModule,
HttpTestingController,
} from '@angular/common/http/testing';
import {execute, ApolloLink, gql, InMemoryCache} from '@apollo/client/common';
import {execute, ApolloLink, gql} from '@apollo/client/core';
import {InMemoryCache} from '@apollo/client/core';
import {ApolloModule, Apollo} from 'apollo-angular';
import {mergeMap} from 'rxjs/operators';

Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular-link-http/tests/SSR.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
HttpTestingController,
} from '@angular/common/http/testing';
import {BrowserModule} from '@angular/platform-browser';
import {gql, execute} from '@apollo/client/common';
import {gql, execute} from '@apollo/client/core';
import {filter, first} from 'rxjs/operators';

import {HttpLink} from '../src/HttpLink';
Expand Down
4 changes: 2 additions & 2 deletions packages/apollo-angular-link-persisted/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
"deploy": "yarn build && npm publish build --registry http://localhost:4873"
},
"peerDependencies": {
"@apollo/client": "^3.0.0-beta.0"
"@apollo/client": "^3.0.0-beta.12"
},
"dependencies": {
"apollo-link-context": "^1.0.7",
"apollo-link-context": "^2.0.0-beta.0",
"apollo-link-persisted-queries": "~0.2.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular-link-persisted/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {DocumentNode} from 'graphql';
import {ApolloLink} from '@apollo/client/common';
import {ApolloLink} from '@apollo/client/core';
import {setContext} from 'apollo-link-context';
import {
createPersistedQueryLink as _createPersistedQueryLink,
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular-link-persisted/tests/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
execute,
Observable,
Operation,
} from '@apollo/client/common';
} from '@apollo/client/core';

import {createPersistedQueryLink} from '../src';

Expand Down
4 changes: 2 additions & 2 deletions packages/apollo-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"peerDependencies": {
"@angular/core": "^6.1.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
"@apollo/client": "^3.0.0-beta.0",
"@apollo/client": "^3.0.0-beta.12",
"rxjs": "^6.0.0",
"zone.js": "~0.8.20 || ~0.9.0 || ~0.10.0"
},
Expand All @@ -43,7 +43,7 @@
"@angular/core": "8.2.13",
"@angular/platform-browser": "8.2.13",
"@angular/platform-browser-dynamic": "8.2.13",
"@apollo/client": "3.0.0-beta.1",
"@apollo/client": "3.0.0-beta.12",
"@schematics/angular": "8.3.18",
"@types/jest": "24.0.23",
"@types/node": "12.12.7",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {NgModule} from '@angular/core';
import {InMemoryCache} from '@apollo/client/common';
import {InMemoryCache} from '@apollo/client/core';
import {ApolloModule, APOLLO_OPTIONS} from 'apollo-angular';
import {HttpLinkModule, HttpLink} from 'apollo-angular-link-http';

Expand Down
4 changes: 2 additions & 2 deletions packages/apollo-angular/schematics/install/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function install(options: Schema): Rule {
}

export const dependenciesMap: Record<string, string> = {
'@apollo/client': '^3.0.0-beta.1',
'@apollo/client': '^3.0.0-beta.12',
'apollo-angular': '^2.0.0-alpha.0',
'apollo-angular-link-http': '^2.0.0-alpha.0',
graphql: '^14.5.0',
Expand Down Expand Up @@ -87,7 +87,7 @@ function inludeAsyncIterableLib() {
'\n' +
tags.stripIndent`
We couln't find '${requiredLib}' in the list of library files to be included in the compilation.
It's required by '@apollo/client/common' package so please add it to your tsconfig.
It's required by '@apollo/client/core' package so please add it to your tsconfig.
` +
'\n',
),
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular/schematics/migrations/v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export async function migrateImports(tree: Tree) {
.join(', ');
recorder.insertLeft(
sourceFile.getStart(),
`import {${props}} from '@apollo/client/common';\n`,
`import {${props}} from '@apollo/client/core';\n`,
);
tree.commitUpdate(recorder);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/apollo-angular/schematics/tests/migration-v2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Migration: Apollo Angular V2', () => {
.toPromise();

expect(tree.readContent('file.ts').trim()).toEqual(
`import {InMemoryCache, ApolloClient, ApolloLink, gql} from '@apollo/client/common';`,
`import {InMemoryCache, ApolloClient, ApolloLink, gql} from '@apollo/client/core';`,
);
});

Expand All @@ -55,7 +55,7 @@ describe('Migration: Apollo Angular V2', () => {
.toPromise();

expect(tree.readContent('file.ts').trim()).toEqual(
`import {InMemoryCache, ApolloClient, ApolloLink, gql as graphql} from '@apollo/client/common';`,
`import {InMemoryCache, ApolloClient, ApolloLink, gql as graphql} from '@apollo/client/core';`,
);
});

Expand Down
6 changes: 4 additions & 2 deletions packages/apollo-angular/src/Apollo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
ApolloClientOptions,
ObservableQuery,
FetchResult,
} from '@apollo/client/common';
} from '@apollo/client/core';
import {Observable, from} from 'rxjs';

import {QueryRef} from './QueryRef';
Expand Down Expand Up @@ -65,7 +65,9 @@ export class ApolloBase<TCacheShape = any> {
extra?: ExtraSubscriptionOptions,
): Observable<FetchResult<T>> {
const obs = from(
fixObservable(this.ensureClient.subscribe<T, V>({...options})),
fixObservable(
this.ensureClient.subscribe<T, V>({...options}),
),
);

return extra && extra.useZone !== true
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular/src/Mutation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Injectable} from '@angular/core';
import {FetchResult} from '@apollo/client/common';
import {FetchResult} from '@apollo/client/core';
import {DocumentNode} from 'graphql';
import {Observable} from 'rxjs';

Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular/src/Query.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Injectable} from '@angular/core';
import {ApolloQueryResult} from '@apollo/client/common';
import {ApolloQueryResult} from '@apollo/client/core';
import {DocumentNode} from 'graphql';
import {Observable} from 'rxjs';

Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular/src/QueryRef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
SubscribeToMoreOptions,
UpdateQueryOptions,
ApolloCurrentQueryResult,
} from '@apollo/client/common';
} from '@apollo/client/core';
import {Observable, from} from 'rxjs';
import {startWith} from 'rxjs/operators';

Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular/src/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {InjectionToken} from '@angular/core';
import {ApolloClientOptions} from '@apollo/client/common';
import {ApolloClientOptions} from '@apollo/client/core';
import {NamedOptions, Flags} from './types';

export const APOLLO_FLAGS = new InjectionToken<Flags>('[apollo-angular] flags');
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
MutationOptions as CoreMutationOptions,
SubscriptionOptions as CoreSubscriptionOptions,
ApolloClientOptions,
} from '@apollo/client/common';
} from '@apollo/client/core';
import {ExecutionResult} from 'graphql';

export type R = {
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
ApolloQueryResult,
ObservableQuery,
Observable as AObservable,
} from '@apollo/client/common';
} from '@apollo/client/core';

export function fromPromise<T>(promiseFn: () => Promise<T>): Observable<T> {
return new Observable<T>(subscriber => {
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular/testing/src/backend.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Injectable} from '@angular/core';
import {Observer} from 'rxjs';
import {FetchResult, Observable as LinkObservable} from '@apollo/client/common';
import {FetchResult, Observable as LinkObservable} from '@apollo/client/core';
import {DocumentNode, print} from 'graphql';

import {ApolloTestingController, MatchOperation} from './controller';
Expand Down
4 changes: 2 additions & 2 deletions packages/apollo-angular/testing/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {
ApolloLink,
Operation as LinkOperation,
ApolloCache,
InMemoryCache,
} from '@apollo/client/common';
} from '@apollo/client/core';
import {InMemoryCache} from '@apollo/client/core';
import {
NgModule,
InjectionToken,
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular/testing/src/operation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
ApolloError,
Operation as LinkOperation,
FetchResult,
} from '@apollo/client/common';
} from '@apollo/client/core';
import {GraphQLError, ExecutionResult} from 'graphql';
import {Observer} from 'rxjs';

Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular/testing/tests/integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Apollo} from 'apollo-angular';
import {TestBed, inject} from '@angular/core/testing';
import {addTypenameToDocument} from 'apollo-utilities';
import {print} from 'graphql';
import {gql, InMemoryCache} from '@apollo/client/common';
import {gql, InMemoryCache} from '@apollo/client/core';

import {
ApolloTestingModule,
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular/testing/tests/module.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {setupAngular} from './_setup';
import {Apollo} from 'apollo-angular';
import {InMemoryCache, ApolloReducerConfig} from '@apollo/client/common';
import {InMemoryCache, ApolloReducerConfig} from '@apollo/client/core';
import {TestBed} from '@angular/core/testing';

import {ApolloTestingModule, APOLLO_TESTING_CACHE} from '../src';
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular/testing/tests/operation.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {gql, execute, ApolloLink} from '@apollo/client/common';
import {gql, execute, ApolloLink} from '@apollo/client/core';

import {buildOperationForLink} from './utils';
import {ApolloTestingBackend} from '../src/backend';
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-angular/tests/Apollo.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ApolloLink,
NetworkStatus,
InMemoryCache,
} from '@apollo/client/common';
} from '@apollo/client/core';
import {NgZone} from '@angular/core';
import {TestBed, inject, async} from '@angular/core/testing';
import {Observable, of} from 'rxjs';
Expand Down
Loading

0 comments on commit 6bcecf2

Please sign in to comment.