Skip to content

Commit b4b8721

Browse files
committed
Update readme to include base_controller option information
1 parent 01cfdf2 commit b4b8721

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ Rails.application.routes.draw do
157157
login: Mutations::Login
158158
},
159159
skip: [:register],
160+
# base_controller: ApiController,
160161
additional_mutations: {
161162
# generates mutation { adminUserSignUp }
162163
admin_user_sign_up: Mutations::AdminUserSignUp
@@ -264,6 +265,7 @@ our default classes and yielding your customized code after calling `super`, exa
264265
and an `authenticatable` type to every query. Gem will try to use `Types::<model>Type` by
265266
default, so in our example you could define `Types::UserType` and every query and mutation
266267
will use it. But, you can override this type with this option like in the example.
268+
1. `base_controller`: Specifying this is optional. By default the controller used to mount the route is `GraphqlDevise::ApplicationController` which inherits from `ActionController::API` or `ActionController::Base` depending on the rails version of the main project. This option allows you to set the controller used as the parent of the controller where the route will be mounted. This config is similar to `Devise`'s `base_controller` config but in this case each route can have a different parent controller.
267269
1. `skip`: An array of the operations that should not be available in the authentication schema. All these operations are
268270
symbols and should belong to the list of available operations in the gem.
269271
1. `only`: An array of the operations that should be available in the authentication schema. The `skip` and `only` options are

0 commit comments

Comments
 (0)