This project is not maintained anymore. You can use graphql-ruby's generators.
A GraphQL Relay schema created by reflection over a Rails models
Check out the example for a demo of Rails GraphQL Generator in action.
Add your Gemfile:
gem 'rails-graphql-generator', '~> 0.1.0'
bundle install
and then just run it!
rails g graphql:init
rails g graphql:create_all
# or
rails g model User name:string email:string
rake db:migrate
rails g graphql User
and start server http://localhost:3000/graphiql
- Add test
- Add without relay option