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

Commit 4f51d0f

Browse files
committed
docs(cookbook/graphql): Add store id resolution
1 parent 73d3af6 commit 4f51d0f

File tree

1 file changed

+2
-1
lines changed
  • public/docs/_examples/heroes-graphql/ts/app

1 file changed

+2
-1
lines changed

public/docs/_examples/heroes-graphql/ts/app/client.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import ApolloClient, { createNetworkInterface } from 'apollo-client';
33
import { networkInterface } from './in-memory-graphql';
44

55
export const client = new ApolloClient({
6-
networkInterface
6+
networkInterface,
7+
dataIdFromObject: (object:any) => object.id,
78
});
89
// #enddocregion

0 commit comments

Comments
 (0)