How to set the bearer token dynamically in graphql-spring-boot playground
skesani opened this issue · 0 comments
skesani commented
Discussed in #928
Originally posted by skesani March 16, 2023
Hey All,
I am using playground embedded by accessing at root /playground, I am checking for a solution on how to set the bearer token based dynamically, current documentation shows, we can set the static token in .yml file like below, however i wanted to set the token programmatically since the token changes based on the user roles and when i navigate to /playground the token should set like below image, please let me know if this is possible? if so please provide a code sample for it. Thanks.
headers:
Authorization: "Bearer <your-token>"
https://github.com/graphql-java-kickstart/graphql-spring-boot#enable-graphql-playground
