Skip to content

Commit

Permalink
Merge branch 'master' into mit
Browse files Browse the repository at this point in the history
  • Loading branch information
Urigo committed Jul 17, 2016
2 parents c44602c + f815007 commit 1234abf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,7 @@
- Passing all the options of mutation in `Apollo` decorator [PR #39](https://github.com/apollostack/angular2-apollo/pull/39)
- Added support for `apollo-client` breaking change that moves methods to query's observable ([PR #40](https://github.com/apollostack/angular2-apollo/pull/40))
- Replaced `lodash` with subpackages, removed `graphql-tag` from dependencies, moved `apollo-client` and `@angular/core` to peerDependecies ([PR #44](https://github.com/apollostack/angular2-apollo/pull/44))
- Added `ApolloQuery` interface ([PR #45](https://github.com/apollostack/angular2-apollo/pull/45))

### v0.3.0

Expand Down
3 changes: 2 additions & 1 deletion examples/hello-world/client/main.ts
Expand Up @@ -13,6 +13,7 @@ import {

import {
Apollo,
ApolloQuery,
} from 'angular2-apollo';

import ApolloClient, {
Expand Down Expand Up @@ -88,7 +89,7 @@ const client = new ApolloClient({
},
})
class Main {
public data: any;
public data: ApolloQuery;
public firstName: string;
public lastName: string;
public nameFilter: string;
Expand Down
13 changes: 13 additions & 0 deletions src/apolloDecorator.ts
Expand Up @@ -2,10 +2,23 @@ import ApolloClient, {
ApolloQueryResult,
} from 'apollo-client';

import {
ApolloError,
} from 'apollo-client/errors';

import isEqual = require('lodash.isequal');
import forIn = require('lodash.forin');
import assign = require('lodash.assign');

export interface ApolloQuery {
errors: ApolloError;
loading: boolean;
refetch: (variables?: any) => Promise<ApolloQueryResult>;
stopPolling: () => void;
startPolling: (pollInterval: number) => void;
unsubscribe: () => void;
}

export interface ApolloOptions {
client: ApolloClient;
queries?: (component?: any) => any;
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Expand Up @@ -4,6 +4,7 @@ import {

import {
Apollo,
ApolloQuery,
} from './apolloDecorator';

import {
Expand All @@ -17,6 +18,7 @@ export const APOLLO_PROVIDERS: any[] = [

export {
Apollo,
ApolloQuery,
ApolloQueryPipe,
Angular2Apollo,
defaultApolloClient
Expand Down

0 comments on commit 1234abf

Please sign in to comment.