Skip to content

Commit

Permalink
Merge branch 'master' into propshaft-support
Browse files Browse the repository at this point in the history
  • Loading branch information
rmosolgo committed Feb 23, 2024
2 parents 01ff3e5 + e928e70 commit 350543e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Tests
on:
push
on: pull_request

jobs:
test:
Expand All @@ -15,7 +14,7 @@ jobs:
- gemfile: Gemfile
ruby: 3.2
- gemfile: Gemfile
ruby: truffleruby-head
ruby: truffleruby-head
runs-on: ubuntu-20.04
steps:
- run: echo BUNDLE_GEMFILE=${{ matrix.gemfile }} > $GITHUB_ENV
Expand Down
22 changes: 22 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,28 @@ end
- `at:` is the path where GraphiQL will be served. You can access GraphiQL by visiting that path in your app.
- `graphql_path:` is the path to the GraphQL endpoint. GraphiQL will send queries to this path.

#### Note on API Mode

If you're using Rails 6 in "API mode", you'll also need to do the following:

1. Add `require "sprockets/railtie"` to your `application.rb`.

2. Create an `app/assets/config/manifest.js` file and add the following:

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

Additionally, for Rails 6, you'll also need to add `dartsass-sprockets` gem to your Gemfile and add a `manifest.js` file for Sprockets 4 to work:
```
--- add to `app/assets/config/manifest.js`
//= link graphiql/rails/application.css
//= link graphiql/rails/application.js
```
Note that the `sassc-rails` gem is unmaintained and [breaks with the newer GraphiQL](https://github.com/rmosolgo/graphiql-rails/issues/106).
See more details in [issue #13](https://github.com/rmosolgo/graphiql-rails/issues/13#issuecomment-640366886)

### Configuration

You can override `GraphiQL::Rails.config` values in an initializer (eg, `config/initializers/graphiql.rb`). The configs are:
Expand Down

0 comments on commit 350543e

Please sign in to comment.