According to example given in https://graphql.dgraph.io/doc/authorization/mutations I can access JWT variables within @auth() queries.
Can I use those JWT variables within @custom() mutations, so https://graphql.dgraph.io/doc/custom/mutation example could be rewritten as:
type Mutation {
newPost(title: String!, text: String, $USER: String!): Post @custom(http:{
url: "https://my.api.com/addPost"
method: "POST",
body: "{ postText: $text, postTitle: $title, author: $USER }"
forwardHeaders: ["AuthHdr"]
})
}
I know I can forward Auth headers and extract the USER at the API endpoint, but accessing JWT variables at @custom() mutation definition could be easier.