jwt token not set in header?
Last active 1 months ago
3 replies
6 views
- AN
I am using nhost apollo client.
const { loading, error2, data } = useQuery(gql
query MyQuery { user(id: "95a8ec60-a163-46b6-855f-09fe6e3d045c") { avatarUrl createdAt } }
);if (loading) {
console.log("loading", loading);
}
if (error2) {
console.log("error2", error2);
}if (data) {
console.log("data query", data);}
https://prnt.sc/7DPkUF-DtP6D
it looks like jwt is not attached to header? - EL
@Ankur63 Do you make sure that the use is signed in before you make the GraphQL request?
- EL
If not, it might be that the graphql request is being fired before the user is signed in and that means that there will be no auth request set in the header.
Last active 1 months ago
3 replies
6 views