We already have something like this. We call it secretHeaders. Here it is:
type Mutation {
MyMutation(field1: String!, field2: String!): MyResponse @custom(http:{
url: "http://mydomain/my/secret/script"
method: "POST"
body: "{ field1: $field1, field2: $field2}"
secretHeaders: ["Content-type"]
})
}
# Dgraph.Secret Content-type "application/json"
It was initially designed to store secrets in the schema. But, it could be used here as well
. This should work for you until we don’t send this header automatically.
Sorry, we don’t have any docs up for it yet.