Skip to content

Commit 81f9d05

Browse files
committed
Fix links in README file and add note on importing (#44)
1 parent 0f88894 commit 81f9d05

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,13 @@ pip install graphql-relay
5252
```
5353

5454
When 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
6974
arguments from `connection_args`, does pagination and filtering, and returns
7075
an 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
7377
member 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
7882
ship_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
128132
def get_node(global_id, _info):
@@ -176,7 +180,7 @@ and a mutation method to map from the input fields to the output fields,
176180
performing the mutation along the way. It then creates and returns a field
177181
configuration 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
182186
class IntroduceShipMutation:

0 commit comments

Comments
 (0)