Skip to content

Commit

Permalink
Support ApolloClient 0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilkisiela committed Jan 5, 2017
1 parent b3300e3 commit 284efb9
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 24 deletions.
14 changes: 8 additions & 6 deletions CHANGELOG.md
Expand Up @@ -2,31 +2,33 @@

### vNEXT

- Update to `apollo-client@0.6.0` [PR #18](https://github.com/kamilkisiela/apollo-client-rxjs/pull/18)

### v0.2.4

- Use `lodash` instead of individual packages [PR #14](https://github.com/kamilkisiela/apollo-client-rxjs/pull/14)
- Made every `RxObservableQuery` asynchronous [PR #13](https://github.com/kamilkisiela/apollo-client-rxjs/pull/13)
- Make every `RxObservableQuery` asynchronous [PR #13](https://github.com/kamilkisiela/apollo-client-rxjs/pull/13)

### v0.2.3

- Updated to `apollo-client@0.5.1` [PR #11](https://github.com/kamilkisiela/apollo-client-rxjs/pull/11)
- Update to `apollo-client@0.5.1` [PR #11](https://github.com/kamilkisiela/apollo-client-rxjs/pull/11)

### v0.2.2

- `rxjs` as a peerDependency [PR #9](https://github.com/kamilkisiela/apollo-client-rxjs/pull/9)

### v0.2.1

- Added support for `rxjs@5.0.0-beta.12` [PR #6](https://github.com/kamilkisiela/apollo-client-rxjs/pull/6)
- Add support for `rxjs@5.0.0-beta.12` [PR #6](https://github.com/kamilkisiela/apollo-client-rxjs/pull/6)

### v0.2.0

- Added `subscribeToMore` function [PR #5](https://github.com/kamilkisiela/apollo-client-rxjs/pull/5)
- Added support for ApolloClient `v0.5.0` [PR #4](https://github.com/kamilkisiela/apollo-client-rxjs/pull/4)
- Add `subscribeToMore` function [PR #5](https://github.com/kamilkisiela/apollo-client-rxjs/pull/5)
- Add support for ApolloClient `v0.5.0` [PR #4](https://github.com/kamilkisiela/apollo-client-rxjs/pull/4)
- BREAKING CHANGE No longer support ApolloClient `v0.4.X` [PR #4](https://github.com/kamilkisiela/apollo-client-rxjs/pull/4)

### v0.1.0

- Added `updateQuery` to `RxObservableQuery` [PR #2](https://github.com/kamilkisiela/apollo-client-rxjs/pull/2)
- Add `updateQuery` to `RxObservableQuery` [PR #2](https://github.com/kamilkisiela/apollo-client-rxjs/pull/2)

### v0.0.1
11 changes: 5 additions & 6 deletions package.json
Expand Up @@ -41,8 +41,8 @@
"lodash": "^4.17.2"
},
"peerDependencies": {
"apollo-client": "^0.5.1",
"rxjs": "^5.0.0-beta.12 || ^5.0.0-rc.1"
"apollo-client": "^0.6.0",
"rxjs": "^5.0.0-beta.12 || ^5.0.0-rc.1 || ^5.0.0"
},
"devDependencies": {
"@types/chai": "^3.4.32",
Expand All @@ -51,20 +51,19 @@
"@types/mocha": "^2.2.31",
"@types/node": "^6.0.38",
"@types/sinon": "^1.16.29",
"apollo-client": "^0.5.1",
"apollo-client": "^0.6.0",
"chai": "^3.5.0",
"graphql": "^0.7.2",
"graphql": "^0.8.0",
"graphql-tag": "^0.1.15",
"isomorphic-fetch": "^2.2.1",
"istanbul": "^0.4.4",
"mocha": "^3.1.2",
"remap-istanbul": "^0.7.0",
"rimraf": "^2.5.4",
"rxjs": "^5.0.0-rc.1",
"rxjs": "^5.0.0",
"sinon": "^1.17.5",
"source-map-support": "^0.4.5",
"tslint": "^3.15.1",
"typed-graphql": "^1.0.2",
"typescript": "^2.0.0"
}
}
6 changes: 3 additions & 3 deletions tests/fixtures/heroes.ts
@@ -1,4 +1,4 @@
import { Document } from 'graphql';
import { DocumentNode } from 'graphql';
import { ApolloClient, ApolloQueryResult, ObservableQuery } from 'apollo-client';

import { RxObservableQuery } from '../../src/RxObservableQuery';
Expand All @@ -10,7 +10,7 @@ import mockNetworkInterface from '../mocks/mockNetworkInterface';

// data

export const query: Document = gql`
export const query: DocumentNode = gql`
query heroes {
allHeroes {
heroes {
Expand All @@ -25,7 +25,7 @@ export const data = {
},
};

export const queryWithVariables: Document = gql`
export const queryWithVariables: DocumentNode = gql`
query heroes {
allHeroes {
heroes {
Expand Down
14 changes: 7 additions & 7 deletions tests/mocks/mockNetworkInterface.ts
Expand Up @@ -6,8 +6,8 @@ import {
} from 'apollo-client/transport/networkInterface';

import {
GraphQLResult,
Document,
ExecutionResult,
DocumentNode,
} from 'graphql';

import {
Expand Down Expand Up @@ -36,19 +36,19 @@ export function mockBatchedNetworkInterface(

export interface ParsedRequest {
variables?: Object;
query?: Document;
query?: DocumentNode;
debugName?: string;
}

export interface MockedResponse {
request: ParsedRequest;
result?: GraphQLResult;
result?: ExecutionResult;
error?: Error;
delay?: number;
}

export interface MockedSubscriptionResult {
result?: GraphQLResult;
result?: ExecutionResult;
error?: Error;
delay?: number;
}
Expand Down Expand Up @@ -185,8 +185,8 @@ export class MockSubscriptionNetworkInterface extends MockNetworkInterface imple
export class MockBatchedNetworkInterface
extends MockNetworkInterface implements BatchedNetworkInterface {

public batchQuery(requests: Request[]): Promise<GraphQLResult[]> {
const resultPromises: Promise<GraphQLResult>[] = [];
public batchQuery(requests: Request[]): Promise<ExecutionResult[]> {
const resultPromises: Promise<ExecutionResult>[] = [];
requests.forEach((request) => {
resultPromises.push(this.query(request));
});
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Expand Up @@ -12,7 +12,6 @@
"noImplicitAny": false
},
"files": [
"typings.d.ts",
"src/index.ts",
"tests/index.ts"
]
Expand Down
1 change: 0 additions & 1 deletion typings.d.ts

This file was deleted.

0 comments on commit 284efb9

Please sign in to comment.