Skip to content

Commit a6d4642

Browse files
committed
chore: latest apollo-client
1 parent 1e93e63 commit a6d4642

File tree

6 files changed

+14
-12
lines changed

6 files changed

+14
-12
lines changed

examples/hello-world/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@angular/platform-server": "^2.3.1",
2525
"@angular/router": "^3.3.1",
2626
"angular2-apollo": "file:../../",
27-
"apollo-client": "~0.6.0",
27+
"apollo-client": "~0.7.0",
2828
"core-js": "^2.4.1",
2929
"graphql-tag": "^1.1.2",
3030
"rxjs": "^5.0.1",
@@ -57,6 +57,6 @@
5757
"rollup-plugin-uglify": "^1.0.1",
5858
"ts-node": "1.2.1",
5959
"tslint": "^4.2.0",
60-
"typescript": "~2.0.6"
60+
"typescript": "~2.1.0"
6161
}
6262
}

examples/hello-world/src/app/app.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export class AppComponent implements OnInit, AfterViewInit {
9090
},
9191
})
9292
.toPromise()
93-
.then(({ data }: ApolloQueryResult) => {
93+
.then(({ data }: ApolloQueryResult<any>) => {
9494
console.log('got data', data);
9595

9696
// get new data

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
"test-only": "jest",
2323
"test-watch": "jest --watch",
2424
"remap": "remap-istanbul -i coverage/coverage-final.json -t lcovonly -o coverage/lcov.info",
25-
"lint": "tslint src/*.ts && tslint tests/*.ts ",
25+
"lint": "tslint src/*.ts && tslint tests/*.ts",
2626
"build": "./node_modules/.bin/ngc -p tsconfig.json",
2727
"build-test": "./node_modules/.bin/ngc -p tsconfig.test.json",
2828
"postbuild": "npm run bundle",
2929
"bundle": "rollup -c",
3030
"clean": "rimraf build/* coverage/*",
31-
"prepublish": "npm run clean && npm run build",
31+
"prepublishs": "npm run clean && npm run build",
3232
"commitmsg": "validate-commit-msg"
3333
},
3434
"peerDependencies": {
@@ -37,7 +37,7 @@
3737
"rxjs": "^5.0.0-beta.12 || ^5.0.0-rc.1 || ^5.0.0"
3838
},
3939
"dependencies": {
40-
"apollo-client-rxjs": "~0.3.0"
40+
"apollo-client-rxjs": "~0.4.0"
4141
},
4242
"devDependencies": {
4343
"@angular/common": "^2.3.1",
@@ -49,6 +49,7 @@
4949
"@angular/platform-server": "^2.3.1",
5050
"@types/jest": "^15.1.32",
5151
"@types/lodash": "^4.14.34",
52+
"@types/node": "^6.0.59",
5253
"apollo-client": "^0.7.1",
5354
"graphql": "^0.8.2",
5455
"graphql-tag": "^1.1.2",
@@ -60,7 +61,7 @@
6061
"rollup": "^0.39.2",
6162
"rxjs": "^5.0.0",
6263
"tslint": "^4.2.0",
63-
"typescript": "~2.0.6",
64+
"typescript": "~2.1.4",
6465
"validate-commit-msg": "^2.8.2",
6566
"zone.js": "^0.7.1"
6667
},

src/Angular2Apollo.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ export class Angular2Apollo {
2121
@Inject(ApolloClientInstance) private client: ApolloClient,
2222
) {}
2323

24-
public watchQuery(options: DeprecatedWatchQueryOptions): ApolloQueryObservable<ApolloQueryResult> {
24+
public watchQuery<T>(options: DeprecatedWatchQueryOptions): ApolloQueryObservable<ApolloQueryResult<T>> {
2525
return new ApolloQueryObservable(rxify(this.client.watchQuery)(options));
2626
}
2727

28-
public query(options: DeprecatedWatchQueryOptions): Observable<ApolloQueryResult> {
28+
public query<T>(options: DeprecatedWatchQueryOptions): Observable<ApolloQueryResult<T>> {
2929
return fromPromise(this.client.query(options));
3030
}
3131

32-
public mutate(options: MutationOptions): Observable<ApolloQueryResult> {
32+
public mutate<T>(options: MutationOptions): Observable<ApolloQueryResult<T>> {
3333
return fromPromise(this.client.mutate(options));
3434
}
3535

tests/ApolloModule.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { ApolloModule, SelectPipe, Angular2Apollo } from '../src';
66
import { ApolloClientWrapper, ApolloClientInstance } from '../src/Angular2Apollo';
77

88
describe('ApolloModule', () => {
9-
let metadata: any = ApolloModule['decorators'][0]['args'][0];
9+
const annotations: any[] = Reflect.getMetadata('annotations', ApolloModule);
10+
const metadata: any = annotations[0]; //ApolloModule['decorators'][0]['args'][0];
1011

1112
it('should contain SelectPipe in declarations', () => {
1213
expect(include(metadata.declarations, SelectPipe)).toBe(true);

tests/_mocks.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NetworkInterface, BatchedNetworkInterface, Request } from 'apollo-client/transport/networkInterface';
1+
import { NetworkInterface, BatchedNetworkInterface, Request } from 'apollo-client/lib/src/transport/networkInterface';
22
import { ApolloClient } from 'apollo-client';
33
import { ExecutionResult, DocumentNode } from 'graphql';
44
import { print } from 'graphql-tag/printer';

0 commit comments

Comments
 (0)