rmosolgo / rmosolgo/graphql-ruby
GraphQL Rack REST Mapper
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 5.4k
- Forks
- 1.4k
- Avg merge
- 23h 19m
- Merged PRs (30d)
- 28
Description
Is your feature request related to a problem? Please describe.
I currently have task I need to solve eventually which is creating a more effective way to replicate our GraphQL queries and mutations into a REST API for an application built using graphql-ruby. Our internal systems consume our GraphQL queries however this application needs a REST API because we have external clients who don't want to use GraphQL in their integration with us. We'd like to write once in GraphQL and then create a pattern to build REST apis automagically from our GraphQL Schema.
Describe the solution you'd like
I was thinking if there was some easy API to traverse the schema in ruby objects I could build a rack middleware to route REST calls to our Graphql controller.
So things come to mind:
- Proposing this functionality for graphql-ruby and see if you are open to it (possibly a Pro option)
- Getting some feedback on which APIs from graphql-ruby would be effective to traverse the schema to start building it myself or possibly any changes to support easy ways to traverse GraphQL schema in a ruby object or json format if there isn't already. I planned on doing my own research on this when this becomes a higher priority for our business but figured I could get a headstart asking here.
- Getting any feedback as the expert in graphql with ruby on how you would approach this
Describe alternatives you've considered
There is some options out there like SOFA and Graphql2rest to map via Express servers however that would mean maintaining a proxy server in javascript. It's feasible option but isn't ideal to add yet another layer of complexity in our infrastructure.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by reviewing graphql-ruby schema traversal APIs and the proposed Rack middleware-to-GraphQL-controller boundary, then compare the SOFA and Graphql2rest alternatives. Done would require an agreed REST mapping design and implementation scope, which this request does not yet define.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, ruby
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100