@@ -52,8 +52,13 @@ pip install graphql-relay
5252```
5353
5454When building a schema for [ GraphQL] ( https://github.com/graphql-python/graphql-core ) ,
55- the provided library functions can be used to simplify the creation of Relay
56- patterns.
55+ the provided library functions can be used to simplify the creation of Relay patterns.
56+
57+ All the functions that are explained in the following sections must be
58+ imported from the top level of the ` graphql_relay ` package, like this:
59+ ``` python
60+ from graphql_relay import connection_definitions
61+ ```
5762
5863### Connections
5964
@@ -68,11 +73,10 @@ they return a connection type.
6873 - ` connection_from_array ` is a helper method that takes an array and the
6974arguments from ` connection_args ` , does pagination and filtering, and returns
7075an object in the shape expected by a ` connection_type ` 's ` resolver ` function.
71-
7276 - ` cursor_for_object_in_connection ` is a helper method that takes an array and a
7377member object, and returns a cursor for use in the mutation payload.
7478
75- An example usage of these methods from the [ test schema] ( tests/starwars/schema .py ) :
79+ An example usage of these methods from the [ test schema] ( tests/star_wars_schema .py ) :
7680
7781``` python
7882ship_edge, ship_connection = connection_definitions(' Ship' , shipType)
@@ -122,7 +126,7 @@ for nodes and for implementing global IDs around local IDs.
122126 non-ID identifiers (like a username) and maps then to their corresponding
123127 objects.
124128
125- An example usage of these methods from the [ test schema] ( tests/starwars/schema .py ) :
129+ An example usage of these methods from the [ test schema] ( tests/star_wars_schema .py ) :
126130
127131``` python
128132def get_node (global_id , _info ):
@@ -176,7 +180,7 @@ and a mutation method to map from the input fields to the output fields,
176180performing the mutation along the way. It then creates and returns a field
177181configuration that can be used as a top-level field on the mutation type.
178182
179- An example usage of these methods from the [ test schema] ( tests/starwars/schema .py ) :
183+ An example usage of these methods from the [ test schema] ( tests/star_wars_schema .py ) :
180184
181185``` python
182186class IntroduceShipMutation :
0 commit comments