Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a route for receiving non graphql requests #595

Closed
ken-nah opened this issue Aug 24, 2019 · 2 comments
Closed

Creating a route for receiving non graphql requests #595

ken-nah opened this issue Aug 24, 2019 · 2 comments

Comments

@ken-nah
Copy link

ken-nah commented Aug 24, 2019

As per the docs Middlewares can also be added specifically to the GraphQL endpoint route, by using server.express.post(server.options.endpoint, myMiddleware()). Am running graphq-yoga and next js & apollo on the frontend. I wanted a none graphql post request '/payment', but its not working. Below is how am doing it
not-working

@WajuAbolarin
Copy link

I think you need to use res.{send,json} here and not call next at all, next signals to express to call the next middleware in it's stack.

@saihaj saihaj mentioned this issue Dec 5, 2021
32 tasks
@n1ru4l
Copy link
Collaborator

n1ru4l commented Apr 20, 2022

@n1ru4l n1ru4l closed this as completed Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants