How can I build a simple rest api in graphql server app v4?

How can I build a simple rest API in my GraphQL server app? I have a function ready to accept the request body and response. But how can I build a rest api out of my graphql server. In such a way that i have the rest endpoint to be something like http://localhost:7777/api/v1/myfunc and my graphql server as the way it is.

public async myfunc(req, res) {
}

Resolved!. I had to change to apollo expressMiddleware

Glad you solved it! Creating another express route is the way to go.

If you don’t mind me asking, what is the use case for your other endpoint?

I added it so as to create a custom endpoint for a payment webhook