Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular2-apollo",
"version": "0.0.2",
"version": "0.1.0",
"description": "Angular 2.0 client for Apollo",
"main": "build/src/index.js",
"typings": "./build/src/index.d.ts",
Expand Down Expand Up @@ -31,13 +31,17 @@
},
"homepage": "https://github.com/apollostack/angular2-apollo#readme",
"dependencies": {
"angular2": "2.0.0-beta.15",
"@angular/core": "2.0.0-rc.1",
"@angular/platform-browser": "2.0.0-rc.1",
"@angular/common": "2.0.0-rc.1",
"@angular/compiler": "2.0.0-rc.1",
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
"apollo-client": "0.1.2",
"es6-shim": "0.35.0",
"graphql": "^0.5.0",
"lodash": "^4.11.1",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"rxjs": "5.0.0-beta.6",
"zone.js": "0.6.11"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/angular2Apollo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
OpaqueToken,
Injectable,
Inject,
} from 'angular2/core';
} from '@angular/core';

export const angularApolloClient = new OpaqueToken('AngularApolloClient');
export const defaultApolloClient = (client: ApolloClient): Provider => {
Expand Down
2 changes: 1 addition & 1 deletion src/apolloQueryPipe.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference path="../typings/main.d.ts" />

import {Pipe} from 'angular2/core';
import {Pipe} from '@angular/core';

@Pipe({
name: 'apolloQuery',
Expand Down
14 changes: 5 additions & 9 deletions tests/angular2Apollo.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import {
it, describe, expect
} from 'angular2/testing';

import {
Provider, Injector,
} from 'angular2/core';
Provider, ReflectiveInjector,
} from '@angular/core';

import ApolloClient from 'apollo-client';

Expand Down Expand Up @@ -37,7 +33,7 @@ describe('angular2Apollo', () => {
function rawApiCall(method: string, options = 'options', result = 'result') {
spyOn(client, method).and.returnValue(result);

const injector = Injector.resolveAndCreate([defaultApolloClient(client), APOLLO_PROVIDERS]);
const injector = ReflectiveInjector.resolveAndCreate([defaultApolloClient(client), APOLLO_PROVIDERS]);
const service = injector.get(Angular2Apollo);

expect(service[method](options)).toBe(result);
Expand All @@ -60,11 +56,11 @@ describe('angular2Apollo', () => {
describe('defaultApolloClient', () => {
it('should create a provider', () => {
const provider = defaultApolloClient(client);
expect(provider).toBeAnInstanceOf(Provider);
expect(provider instanceof Provider).toBe(true);
});

it('should set a AngularApolloClient', () => {
const injector = Injector.resolveAndCreate([defaultApolloClient(client)]);
const injector = ReflectiveInjector.resolveAndCreate([defaultApolloClient(client)]);
expect(injector.get(angularApolloClient)).toBe(client);
});
});
Expand Down
5 changes: 2 additions & 3 deletions tests/apolloQueryPipe.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {it, describe, expect, beforeEach} from 'angular2/testing';
import {ApolloQueryPipe} from '../src/apolloQueryPipe';

describe('ApolloQueryPipe', () => {
Expand All @@ -11,8 +10,8 @@ describe('ApolloQueryPipe', () => {
it('should capitalize all words in a string', () => {
const object = {
data: {
foo: 'bar'
}
foo: 'bar',
},
};
const result = pipe.transform(object, ['foo']);

Expand Down