Skip to content

Commit

Permalink
Fix custom fruit pagination example (#3363)
Browse files Browse the repository at this point in the history
  • Loading branch information
eudago committed Feb 26, 2024
1 parent 4494638 commit 1a694e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/guides/relay.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,10 @@ class FruitCustomPaginationConnection(relay.Connection[Fruit]):

@strawberry.type
class Query:
fruits: FruitCustomPaginationConnection
@relay.connection(FruitCustomPaginationConnection)
def fruits(self) -> Iterable[Fruit]:
# This can be a database query, a generator, an async generator, etc
return all_fruits.values()
```

In the example above we specialized the `FruitCustomPaginationConnection` by
Expand Down

0 comments on commit 1a694e4

Please sign in to comment.