Skip to content

Commit

Permalink
Add instructions for adding GraphiQL assets to manifest.js
Browse files Browse the repository at this point in the history
These instructions are needed as Sprockets 4 changes the logic for which
assets are to be included for precompilation by default. They can be
removed once rmosolgo/graphiql-rails#76 is
merged and released.
  • Loading branch information
Alexander Popov committed Nov 20, 2019
1 parent 8890267 commit e9144a4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion content/backend/graphql-ruby/2-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ Fields can be resolved in one of two ways:

It's time to check what you've done so far! For this, you'll use [GraphiQL](https://github.com/graphql/graphiql), an in-browser IDE for running GraphQL queries.

GraphiQL had already been added to your application when you executed `rails generate graphql:install` in the terminal before, so you don't have to do any extra work to set it up.
GraphiQL had already been added to your application when you executed `rails generate graphql:install` in the terminal before, but you have tell the asset pipeline to precompile its assets. Add this at the end of `/app/assets/config/manifest.js`:

```js
//= link graphiql/rails/application.css
//= link graphiql/rails/application.js
```

Open your browser at http://localhost:3000/graphiql

Expand Down

0 comments on commit e9144a4

Please sign in to comment.