Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 1.22 KB

README.md

File metadata and controls

48 lines (34 loc) · 1.22 KB

README

This is a Proof of Concept Rails project using Graphql. This was mainly created for these blog posts:

Main Features

  • 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

Data Models

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.

Development

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