Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1.06 KB

graphiql_auth.md

File metadata and controls

32 lines (21 loc) · 1.06 KB

GraphiQL usage

Use GraphiQL interface without having a proper login interface.

Login

As we're using the lexik JWT bundle and security rules on the graphql endpoint, we generally need a connection token to carry out queries via GraphiQL.

How to get a token

  1. Import this API collection into Postman and login as a User or Admin.

  2. Copy/Paste the response token into .env.local like :

###> graphiql ###
GRAPHIQL_JWT_TOKEN="token-jwt-azertyuiopqsdfghjklmwxcvbn"
###< graphiql ###

Tip

If you've already developed a login interface, you can use it to get a token.

How to use GraphiQL

Don't forget to install GraphQL extention to your IDE and generate the schema.graphql

See this introduction and documentation about exploring data with GraphiQL.