You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@ graphql-compose-relay
2
2
======================
3
3
This is a plugin for `graphql-compose`, which wraps GraphQL types with Relay specific things, like `Node` type and interface, `globalId`, `clientMutationId`.
@@ -13,6 +14,7 @@ composeWithRelay(userTypeComposer); // wrap Type with middlewares, that add rela
13
14
composeWithRelay(someOtherTypeComposer);
14
15
```
15
16
That's all!
17
+
16
18
No annoying `clientMutationId` manipulations (declaration, passthru, stripping from input).
17
19
No manual adding/wrapping `id` field. This field returns globally unique ID among all types in format `base64(TypeName + ':' + recordId)`.
18
20
All relay magic done internally by middleware for you.
@@ -22,6 +24,7 @@ Requirements
22
24
Method `composeWithRelay` accept `TypeComposer` as input argument. So `TypeComposer` should meet following requirements:
23
25
- has defined `recordIdFn` (function that from object gives you id)
24
26
- should have `findById` resolver
27
+
25
28
If something is missing `composeWithRelay` throws error.
26
29
27
30
`TypeComposer` is [graphql-compose](https://github.com/nodkz/graphql-compose) utility, that wraps GraphQL type and provide bunch of useful methods for type manipulation.
0 commit comments