@@ -5,7 +5,7 @@ title: Globally Unique Object Identification ("nodeId" / "id")
55---
66
77We implement the
8- [ Relay Global Object Identification Specification] ( https://facebook.github.io/relay/graphql/objectidentification.htm ) ,
8+ [ GraphQL Global Object Identification Specification] ( https://facebook.github.io/relay/graphql/objectidentification.htm ) ,
99so any table that has a primary key will automatically have a unique ` nodeId `
1010field available for queries and mutations. This is commonly used as the cache
1111key for your client library, e.g. with Apollo Client's ` dataIdFromObject ` :
@@ -28,17 +28,21 @@ export const client = new ApolloClient({
2828** WARNING** : by default, we call the Global Object Identifier ` nodeId ` to avoid
2929clashing with the ` id ` field that's common practice in database design. If you
3030wish to call the Global Object Identifier field ` id ` instead (as is mandated by
31- the Relay specification), you can do so with our ` --classic-ids ` CLI flag. In
32- doing so, any ` id ` column will automatically be renamed to ` rowId ` .
31+ the specification), you can do so with our ` --classic-ids ` CLI flag. In doing
32+ so, any ` id ` column will automatically be renamed to ` rowId ` .
3333
34- ### Disabling the Relay Global Object Identifier
34+ ### Disabling the Global Object Identifier
3535
36- You can disable the relay global object identifier throughout your API by
37- skipping the ` require('graphile-build').NodePlugin ` plugin; e.g. from the CLI:
36+ You can disable the global object identifier throughout your API by skipping
37+ the ` require('graphile-build').NodePlugin ` plugin; e.g. from the CLI:
3838
3939```
4040postgraphile --skip-plugins graphile-build:NodePlugin ...
4141```
4242
4343Ensure that you have a good way of generating cache identifiers for your GraphQL
4444client though!
45+
46+ (Note: the GraphQL Global Object Identification Specification was previously
47+ known as the Relay Global Object Identification Specification, but it's not
48+ specific to Relay.)
0 commit comments