@@ -41,15 +41,16 @@ First, you need to mount the gem in the routes file like this
4141Rails .application.routes.draw do
4242 mount_graphql_devise_for ' User' , at: ' api/v1' , authenticable_type: Types ::CustomUserType , operations: {
4343 login: Mutations ::Login
44- }
44+ }, skip: [:sign_up ]
45+ end
4546```
4647If you used DTA's installer you will have to remove the ` mount_devise_token_auth_for `
4748line.
4849
4950Here are the option for the mount method:
5051
51521 . ` at ` : Route where the GraphQL schema will be mounted on the Rails server. In the
52- example your API will have this two routes ` POST /api/v1// graphql_auth ` ` GET /api/v1/ /graphql_auth ` .
53+ example your API will have this two routes ` POST /api/v1/graphql_auth ` and ` GET /api/v1/graphql_auth ` .
5354If no this option is not specified, the schema will be mounted at ` /graphql_auth ` .
54551 . ` operations ` : Specifying this one is optional. Here you can override default
5556behavior by specifying your own mutations and queries for every GraphQL operation.
@@ -62,6 +63,23 @@ our default classes and yielding your customized code after calling `super`, exa
6263and an ` authenticable ` type to every query. Gem will try to use ` Types::<model>Type ` by
6364default, so in our example you could define ` Types::UserType ` and every query and mutation
6465will use it. But, you can override this type with this option like in the example.
66+ 1 . ` skip ` : An array of the operations that should not be available in the authentication schema. All these operations are
67+ symbols and should belong to the list of available operations in the gem.
68+ 1 . ` only ` : An array of the operations that should be available in the authentication schema. The ` skip ` and ` only ` options are
69+ mutually exclusive, an error will be raised if you pass both to the mount method.
70+
71+ #### Available Operations
72+ The following is a list of the symbols you can provide to the ` operations ` , ` skip ` and ` only ` options of the mount method:
73+ ``` ruby
74+ :login
75+ :logout
76+ :sign_up
77+ :update_password
78+ :send_reset_password
79+ :confirm_account
80+ :check_password_token
81+ ```
82+
6583
6684### Configuring Model
6785Just like with Devise and DTA, you need to include a module in your authenticable model,
0 commit comments