Skip to content

Commit 1fa465a

Browse files
author
Thomas Draier
committed
Added custom relay documentation
1 parent b14bb1b commit 1fa465a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,19 @@ GraphQLAnnotations.register(new UUIDTypeFunction())
138138

139139
You can also specify custom type function for any field with `@GraphQLType` annotation.
140140

141-
## Relay Mutations
141+
## Relay support
142+
143+
### Mutations
142144

143145
You can use `@GraphQLRelayMutation` annotation to make mutation adhere to
144146
Relay [specification for mutations](https://facebook.github.io/relay/graphql/mutations.htm)
145147

146-
## Relay Connection
148+
### Connection
147149

148150
You can use `@GraphQLConnection` annotation to make a field iterable in adherence to Relay [Connection specification](https://facebook.github.io/relay/graphql/connections.htm).
151+
152+
### Customizing Relay schema
153+
154+
By default, GraphQLAnnotations will use the `graphql.relay.Relay` class to create the Relay specific schema types (Mutations, Connections, Edges, PageInfo, ...).
155+
It is possible to set a custom implementation of the Relay class with `GraphQLAnnotations.setRelay` method. The class should inherit from `graphql.relay.Relay` and
156+
can redefine methods that create Relay types.

0 commit comments

Comments
 (0)