How to generate Customer token GraphQL Query Magento 2?

Generate Customer Token GraphQL mutation for any query that requires customer authentication to load data using GraphQL.

generateCustomerToken() mutation is the use to create a token.

You just have to pass your email id and password to the mutation to create a customer token.

Generate Customer Token Query,

In the output, the token field will be the value of your customer authorization bearer value.

Output

You can use the token value in any query/mutation with an authorization header.
Authorization Bearer prq1sal5lw6um24vmuq9tdrzym4pl74c

This is the simplest way to achieve a customer token in GraphQL.

You can do the same thing Using REST API by How to generate customer access token by REST API Magento 2?