This is a Proof of Concept Rails project using Graphql. This was mainly created for these blog posts:
- Ruby on Rails setup with GraphQL
- DataLoaders for fetching data in batch
- BelongsToLoader
- HasManyLoader (works for has_many through relations as well)
- All main models are connected
- All main models are exposed as root query
- In any level of a GraphQL request (query), you can:
- Filter
- Sort
- Paginate
- RSpec tests for the GraphQL requests
This app has a very limited version of a regular e-commerce data modeling with:
- Category
- Product
- Order
- User
This simple data model will work as a common base for this Proof of Concept.
This is a regular Rails app, so you can just:
rails db:create db:migrate db:seed
rails server
Then you can use your prefered GraphQL tool pointed to: http://localhost:3000/graphql
You can also use the built in GrapiQL