For @custom, the body has to be JSON.
For graphql+- requests to /query, the body is sent as text/plain. So, you can’t directly write graphql+- in @custom body. You, will have to write a separate backend app to do that thing. The separate backend app will form the proper graphql+- query and send it to dgraph. The url of the separate backend app can be specified in @custom with whatever JSON payload you would want to send that endpoint.