'Nil JW Token at /graphiql
I`m trying to use JWT with Rails&GraphQL and set at http://localhost:3001/graphiql any query:
query {
courses {
edges {
node {
id
title
}
}
}
}
And I get from GraphQL message:
{
"error": "Nil JSON web token"
}
In terminal i have message:
(called from include at /project-api/app/controllers/application_controller.rb:6)
Processing by GraphqlController#execute as */*
Parameters: {"query"=>"\nquery {\n courses {\n edges {\n node {\n id\n title\n }\n }\n }\n}", "variables"=>nil, "graphql"=>{"query"=>"\nquery {\n courses {\n edges {\n node {\n id\n title\n }\n }\n }\n}", "variables"=>nil}}
[active_model_serializers] Rendered ActiveModel::Serializer::Null with Hash (0.12ms)
Filter chain halted as :find_or_create_current_user rendered or redirected
Completed 401 Unauthorized in 11ms (Views: 8.4ms | ActiveRecord: 0.0ms)
Please tell me where can I start to solve this problem
P.S. The token is tracked successfully and it is valid
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
