This project has moved to https://gitlab.com/ynote_hk/experiment-graphql-ruby.
Experiment GraphQL Ruby
Experiment from 2018
This is a project that intends to test GraphQL with Ruby.
This app provides a GraphQL endpoint to create metrics and rates in order to display charts on the front-end. All queries and mutations are available on /graphiql
.
Results 📝
- It is easy and fast to create a GraphQL endpoint with Rails and
graphql-ruby
. - I learn to create types, mutations and queries with
graphql-ruby
. - It should be easy to create a gem to generate a new type and basic query linked to it. After the Paris.RB conf 2018, I found out that someone (@Poilon) did it: https://github.com/Poilon/graphql-rails-api.
- The beginning of this project was for a personnal purpose that needs a front-end interface:
- easily rate a metric through a web application,
- display charts depending on time and these rates.
Steps
- Create a new Rails 5 app.
- Create a
Rate
model and the associated type. - Create a
Metric
model and the associated type. - Create needed mutations and queries.
Requirements
- Ruby 2.3.6
Resources
Credits
Thanks to @sunny for teaching me the basics of graphql-ruby.