Cannot separate route configs for POST and GET requests
See original GitHub issueThis git issue was closed (incorrectly?). The reason it’s an issue is because of the referenced. https://github.com/apollographql/apollo-server/issues/3354
This came up for us when trying to change the max payload size:
await apolloServer.applyMiddleware({
app: hapiServer,
path: pathname,
route: {
cors: true,
payload: { maxBytes: MAX_BYTES },
},
});
You cannot set payload on route
because the config is used for both the GET and POST requests.
GET requests cannot have payload
config.
The plugin should allow specifying different route
config for the GET and POST requests.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Handle both GET and POST request with same route in .net ...
Have you tried to create two separate functions. One for GET and the other for POST? You can still set the Route attribute...
Read more >Working with routes for HTTP APIs - Amazon API Gateway
Routes direct incoming API requests to backend resources. Routes consist of two parts: an HTTP method and a resource path—for example, GET /pets...
Read more >Routing and Action Selection in ASP.NET Web API
NET Web API routes an HTTP request to a particular action on a controller. Note. For a high-level overview of routing, see Routing...
Read more >Handle GET and POST Request in Express - CodeForGeek
Hi Brian, Its seems to be a routing issue. Please verify the route you provided for the post method is correct.
Read more >How to Perform HTTP Requests with Axios – A Complete Guide
Sending asynchronous HTTP queries to REST endpoints and performing CRUD operations is simple using Axios POST request and GET request.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For anyone stumbling onto this issue, the integration can now be found here: https://github.com/apollo-server-integrations/apollo-server-integration-hapi/
It’s still a work in progress. Tests are passing, but there is some needed configuration support necessary.
Looks like the person who took interest in resolving this issue (@arimus) is also the person who’s currently working on the AS 4 Hapi integration. I recommend keeping an eye out or collaborating with them on the v4 integration.