javaspringspring-bootauthenticationgraphiql

How to use Graphiql when graphql protected?


I have added the token to the properties file, yet unable to get the resource, and in request header there is no authorization, do I need to add any extra properties

graphiql:
    mapping: /graphiql
    endpoint:
      graphql: /graphql
      subscriptions: /subscriptions
    subscriptions:
      timeout: 30
      reconnect: false
    basePath: /
    headers:
      Authorization: "Bearer eyJraWQiOiJvMW5

Solution

  • Add Authentication header in JSON format in the UI itself, refer the below imageAuthentication