hasura / hasura/graphql-engine
Incomplete relay implementation
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Is your proposal related to a problem?
TL;DR;
Relay implementation is currently lacking most of hasura's best features. This issue summarises all the missing points.
When I started using Hasura, I was amazed by all the power out of nothing, it really improved my dx and my workflow.
In order to get even more productive I gave a try to relay endpoint and... it is so frustrating! As of now, only connections are implemented at root level; no views, no aggregations... I know this is related to the way relay is designed (uniqueness of id) but then it's not usable at all for a big project (i.e. the actual purpose of relay).
For example if I want to use both aggregations and pagination features(out of relay) while taking advantage of client-side implementation (fragment based w/ relay compiler) it's not possible: I have to trick by using both relay client and another one (apollo, urql...).
### Describe the solution you'd like
There are two possibilities:
1. Community shows interest for using relay w/ hasura (which I hope)
2. No one cares for it
If community cares, we (hasura team & community) could discuss priority of all missing features and vote? On the other hand if no one wants to use it and it's stated that no changes will be done on it (actual position of hasura when asking about roadmap) then there should be bigger disclaimers not to use relay at all(except if your need is to make a blog - but hasura may not be the best tool for it).
Today, relay is growing fast(new major version being released by facebook soon with improved compiler) and is IMHO a really good tool for large codebases. The main pain with it is documentation / discussion around: many topics are 2-3 years old and not relevant regarding actual codebase. I was so grateful to find [this video](https://www.youtube.com/watch?v=aoNiUkYLguM) where hasura explains how to deep dive in it and understand main principles (actually the best one to start learning relay).
I was really enthusiast when reading all hasura announcements about relay support and the documentation stating that things may get better soon but 1.5 years later nothing seems to have moved on this particular point:

Here's a list of features:
- [x] Global object identification - normal table with pk id
- [ ] SQL Views queries
- [ ] Aggregations queries
- [x] Connections (with cursor based pagination)
- [ ] Other db than Postgres
- [ ] Persisted queries
- [ ] remote schemas
- [ ] actions
This list probably lacks a lot of items, I wrote the one I noticed/were stated in official limitations so please comment below and I'll edit.
### Describe alternatives you've considered
N/A
### If the feature is approved, would you be willing to submit a PR?
Would be a pleasure but I need to learn Haskell first (fullstack JS dev here)
Contributor guide
Assessment
This issue has not been assessed yet.