Closed Souravgoswami closed 3 years ago
Hi, I am just getting started with GraphQL.
$ bundle add graphql graphiql-rails
Which added:
gem "graphql", "~> 1.11" gem "graphiql-rails", "~> 1.7"
to Gemfile
Ran
$ rails g graphql:install
Typed this content to app/assets/config/manifest.js:
//= link graphiql/rails/application.css //= link graphiql/rails/application.js
Typed this content to config/routes.rb:
Rails.application.routes.draw do if Rails.env.development? mount GraphiQL::Rails::Engine, at: '/graphiql', graphql_path: '/graphql' end end
Ran server:
rails s -b 0 -p 8080
Browsed to /graphiql, and got this error:
Solution:
uninitialized constant GraphqlController::GraphQLSchema
Hi, I am just getting started with GraphQL.
Which added:
to Gemfile
Ran
Typed this content to app/assets/config/manifest.js:
Typed this content to config/routes.rb:
Ran server:
Browsed to /graphiql, and got this error: