This is an old revision of the document!
1) Create new Ruby on Rails application
Ruby Verions 2.6.2 Rails verions 5.1.4 rails new learnexa_api -d mysql
2) Add GraphQL in gem file
gem 'graphql', '~>1.8.10' bundle install
3) Add GraphQL to a Rails app
rails g graphql:install bundle install
4) Add existing learnexa db in database.yml file
default: &default
adapter: mysql2
encoding: utf8
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: root
password: root
socket: /var/run/mysqld/mysqld.sock
development:
<<: *default
database: learnexa_db
4) Start rails server Open localhost:3000/graphiql to gew