I successfully worked through the Angular2 tutorial. Now I want to replace the HTTP server from the last step with an Apollo-GraphQL server (http://docs.apollostack.com/apollo-client/angular2.html).
I added the Apollo-dependencies to my package.json
:
"angular2-apollo": "0.1.0",
"apollo-client": "0.3.12",
"graphql": "^0.5.0",
"graphql-tools": "^0.3.8",
In my main.js
I am bootstrapping the Apollo providers:
import { APOLLO_PROVIDERS } from 'angular2-apollo';
...
bootstrap(AppComponent, [ APOLLO_PROVIDERS ]);
Unfortunately, this gives me a 404 when I start the server:
16.06.03 11:55:47 404 GET /angular2-apollo/index.js
I adapted the SystemJS-config like this:
var map = {
...
'angular2-apollo': 'node_modules/angular2-apollo/src',
...
};
var packages = {
...
'angular2-apollo': { main: 'index.js', defaultExtension: 'js' },
...
};
This worked for the angular2-apollo module. But now every other imported module inside the angular2-apollo module gets a 404. Of course I could go through the whole dependency tree and add every module to SystemJS (in fact I did this until a depth of ~3). But this is clearly not how it is supposed to work?
Is there a convenient way to get Angular2 working with the Apollo Integration?