Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 63eaae7

Browse files
committed
docs(graphql-cookbook): Add the old in-memory-data just so the file will look nice
1 parent 0527b87 commit 63eaae7

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

public/docs/_examples/heroes-graphql/ts/src/app/app.module.1.ts

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { HttpModule } from '@angular/http';
1010
import { AppRoutingModule } from './app-routing.module';
1111

1212
// #enddocregion v1
13+
import { InMemoryWebApiModule } from 'angular-in-memory-web-api';
14+
import { InMemoryDataService } from './in-memory-data.service';
1315

1416
// #docregion import-apollo
1517
import { ApolloModule } from 'apollo-angular';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// #docregion , init
2+
import { InMemoryDbService } from 'angular-in-memory-web-api';
3+
export class InMemoryDataService implements InMemoryDbService {
4+
createDb() {
5+
let heroes = [
6+
{id: 11, name: 'Mr. Nice'},
7+
{id: 12, name: 'Narco'},
8+
{id: 13, name: 'Bombasto'},
9+
{id: 14, name: 'Celeritas'},
10+
{id: 15, name: 'Magneta'},
11+
{id: 16, name: 'RubberMan'},
12+
{id: 17, name: 'Dynama'},
13+
{id: 18, name: 'Dr IQ'},
14+
{id: 19, name: 'Magma'},
15+
{id: 20, name: 'Tornado'}
16+
];
17+
return {heroes};
18+
}
19+
}

0 commit comments

Comments
 (0)