graphql_devise icon indicating copy to clipboard operation
graphql_devise copied to clipboard

Disable introspection

Open jpmermoz opened this issue 1 year ago • 1 comments

Is there a way to disable public introspection when mounting the schema using mount_graphql_devise_for ? I've tried this way but its still enabled:

mount_graphql_devise_for(
    User,
    {
      at: "auth",
      additional_mutations: {
        sso_login: Mutations::SsoLogin,
        user_login: Mutations::Login
      },
      public_introspection: false
    }
  )

Thank you

jpmermoz avatar May 09 '23 17:05 jpmermoz

Hey, @jpmermoz! I don't think there's a way now. We need to do something similar to what is described in https://graphql-ruby.org/schema/introspection.html#disabling-introspection for the separate route. We do support public or authroized introspection when using the plugin in your schema as described in https://github.com/graphql-devise/graphql_devise#introspection-query

I'll look into how much effort it would be to add this if you are using the mount_graphql_devise_for method

mcelicalderon avatar May 10 '23 15:05 mcelicalderon