This repository was archived by the owner on Dec 4, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed
public/docs/_examples/heroes-graphql Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class Hero {
43
43
}
44
44
}
45
45
46
- describe ( 'Tutorial part 6 ' , ( ) => {
46
+ describe ( 'Heroes GraphQL ' , ( ) => {
47
47
48
48
beforeAll ( ( ) => browser . get ( '' ) ) ;
49
49
Original file line number Diff line number Diff line change 1
1
// #docregion
2
- import ApolloClient , { createNetworkInterface } from 'apollo-client' ;
2
+ import { ApolloClient , createNetworkInterface } from 'apollo-client' ;
3
3
import { networkInterface } from './in-memory-graphql' ;
4
4
5
- export const client = new ApolloClient ( {
5
+ const client = new ApolloClient ( {
6
6
networkInterface,
7
7
dataIdFromObject : ( object :any ) => object . id ,
8
8
} ) ;
9
+ export {
10
+ client
11
+ }
9
12
// #enddocregion
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ const resolveFunctions = {
67
67
heroes ( obj : any , args : any ) {
68
68
if ( args . search ) {
69
69
return heroes . filter ( function ( currentHero ) {
70
- return currentHero . name . search ( args . search ) != - 1 ;
70
+ return currentHero . name . toLowerCase ( ) . search ( args . search . toLowerCase ( ) ) != - 1 ;
71
71
} ) ;
72
72
} else {
73
73
return heroes ;
@@ -133,6 +133,9 @@ class InBrowserNetworkInterface {
133
133
}
134
134
}
135
135
136
- export const networkInterface = new InBrowserNetworkInterface ( { schema } ) ;
136
+ const networkInterface = new InBrowserNetworkInterface ( { schema } ) ;
137
+ export {
138
+ networkInterface
139
+ }
137
140
// #enddocregion execute-and-export
138
141
// #enddocregion
You can’t perform that action at this time.
0 commit comments