My restAPI POST call return a uuid string as result, like so:
246f97e8-cdc8-4b01-9881-19278be7e33d
This API is wrapped with GraphQL. The mutation I wrote for this post method works fine, I can see it gets triggered and return a 200 status. The only problem is that I cannot return that same string as the mutation result. This is what I have:
mutation myMutation($input: any) {
myMutation(input: $input)
@rest(type: "type", path: "apiPath", method: "POST", endpoint: "myEndpoint")
{
id
}
}
That id return an integer and any other value I add besides id
return "null"
.
Any idea on how I can get that uuid through the mutation?