This example has made it live through these commands
rails new graphql-rails-api-example --database=postgresql --api
Create the DB
cd graphql-rails-api-example
rails db:create
then added the gems to the Gemfile
gem 'graphql'
gem 'graphql-rails-api'
Install the gems
bundle
Install graphql_rails_api
rails generate graphql_rails_api:install
Generate resources
rails generate graphql_resource user email:string first_name:string last_name:string authentication_token:string
rails generate graphql_resource hdd ref:string
rails generate graphql_resource computer ref:string description:text belongs_to:user has_many:hdds
rails generate graphql_resource motherboard ref:string belongs_to:computer
rails generate graphql_resource graphics_card ref:string belongs_to:computer
rails generate graphql_resource component_tag code:string many_to_many:motherboards many_to_many:graphics_cards many_to_many:hdds
Done !