Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/victorandree/apollo-federation-relay
A demo of Apollo Federation and global Node resolution
https://github.com/victorandree/apollo-federation-relay
apollo-federation graphql relay relay-cursor-connections
Last synced: 4 days ago
JSON representation
A demo of Apollo Federation and global Node resolution
- Host: GitHub
- URL: https://github.com/victorandree/apollo-federation-relay
- Owner: victorandree
- License: mit
- Created: 2019-08-21T12:19:06.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-03T05:30:10.000Z (almost 2 years ago)
- Last Synced: 2024-08-01T13:34:47.634Z (3 months ago)
- Topics: apollo-federation, graphql, relay, relay-cursor-connections
- Language: JavaScript
- Homepage:
- Size: 295 KB
- Stars: 48
- Watchers: 5
- Forks: 15
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - victorandree/apollo-federation-relay - A demo of Apollo Federation and global Node resolution (JavaScript)
README
# Apollo Federation and Relay conventions
> Combining Apollo Federation with Relay server specifications
## Support
- [x] [Relay Global Object Identification]
- [x] [Relay Cursor Connections][Relay Input Object Mutations] are no longer a required part of Relay,
and the linked specification appears to have been removed.
It was never affected by Apollo Federation.## Quick start
```shell
npm install
npm run start
```Then you can query for products from the global `node` interface:
```graphql
query {
node(id: "UHJvZHVjdDox") {
id
... on Product {
name
}
}
}
```You can also query for reviews, which can review any node supported by the review service:
```graphql
query {
reviews {
id
body
rating
node {
__typename
id
... on Product {
name
reviews {
edges {
node {
rating
}
}
}
}
}
}
}
```## TODO
- [x] Automatically generate schema for Node resolution service in gateway
- [x] Run Node resolution service locally in gateway
- [x] Support `query { node }` in each service[Relay Global Object Identification]: https://relay.dev/graphql/objectidentification.htm
[Relay Cursor Connections]: https://relay.dev/graphql/connections.htm
[Relay Input Object Mutations]: https://relay.dev/graphql/mutations.htm