Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oscartbeaumont/async-graphql-relay
Relay support for async-graphql
https://github.com/oscartbeaumont/async-graphql-relay
async-graphql graphql graphql-relay relay rust rust-graphql-server
Last synced: 27 days ago
JSON representation
Relay support for async-graphql
- Host: GitHub
- URL: https://github.com/oscartbeaumont/async-graphql-relay
- Owner: oscartbeaumont
- License: mit
- Created: 2021-05-17T16:52:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-30T01:18:08.000Z (10 months ago)
- Last Synced: 2024-10-03T08:29:07.578Z (about 1 month ago)
- Topics: async-graphql, graphql, graphql-relay, relay, rust, rust-graphql-server
- Language: Rust
- Homepage:
- Size: 33.2 KB
- Stars: 30
- Watchers: 4
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
async-graphql-relay
Relay support for async-graphql
This crate aims to bring the [Relay server specification](https://relay.dev/docs/guides/graphql-server-specification) to [async-graphql](https://github.com/async-graphql/async-graphql). The Relay specification requires three main things:
- Globally unique IDs
- This crate achieves this by appending the database UUID with an integer which represents the objects type
- Refetching using the `node` query
- This crate calls a `get()` method on the type specified in the globally unique ID to refetch the object.
- Connections for Pagination
- This feature already exists in [async-graphql](https://github.com/async-graphql/async-graphql). [Documentation for this feature is here](https://async-graphql.github.io/async-graphql/en/cursor_connections.html).## Install
Add `async-graphql-relay` to your dependencies:
```toml
[dependencies]
# ...
async-graphql = "2.8.5"
async-graphql-relay= "0.3.0"
```
## UsageCheck out [this example application](https://github.com/oscartbeaumont/async-graphql-relay/tree/main/example).