-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Cannot separate route configs for POST and GET requests #4967
Comments
That makes sense. There's not a lot of hapi expertise on the Apollo Server core team nor would we be QAing any hapi changes in a real production environment, so this is the kind of change I'd be happy to review if it came in as a PR. |
I haven't written any tests but here's how I "fixed" this and did some testing with it. The live testing did allow larger byte sizes
|
@champagnetony I've created a pull request. Thanks for the pointers. @glasser I've created a PR to address this ticket and I've validated that it works with a test and actually using it in my project successfully. Let me know if you need anything else, like more robust tests, etc. I did the minimal needed to prove that payload options would make themselves into the POST route configuration and not the GET ones. Not sophisticated, but it allows some more robust configuration in the HAPI configuration simply. p.s. I have a v2 back port of the same if anyone is really interested. Didn't want to go through the PR hassle unless anyone actually cared though. |
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. |
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. |
apollo-server/packages/apollo-server-hapi/src/hapiApollo.ts
Line 38 in 98268d1
This git issue was closed (incorrectly?). The reason it's an issue is because of the referenced.
#3354
This came up for us when trying to change the max payload size:
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.The text was updated successfully, but these errors were encountered: