question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi!

As you may know Hapi has built in parsing of multipart requests and there are currently some issues with combining graphql-upload with that. If you want more background, check out this PR against apollo-server-hapi https://github.com/apollographql/apollo-server/pull/4943

The nicest way to integrate Hapi would be to let Hapi parse the request and provide an API from graphql-upload to handle that case, which you also describe in this old comment https://github.com/jaydenseric/graphql-upload/issues/5#issuecomment-309706215

In this comment https://github.com/apollographql/apollo-server/pull/4943#issuecomment-796738593 in the above PR you can see how I do this with Hapi, but with a lot of copy and paste from processRequest. Are you interested to further explore an API that could be exported for Hapi users as well used internally by processRequest to avoid this duplication?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Pajncommented, Mar 16, 2021

Thank you for your answer!

Interesting about the sync and async case. Hapi does have (and I use) and option to stream the files but I get a list of them immediately so when thinking about it it’s probably using the sync thing anyway (except for possibly the last file). I’ll investigate this further. Now I understand some questions I previously had about the code 😃

I absolutely understand your side, please do not feel pressured engage in this. I have solved “my” problem and is enjoying graphql-upload both now with Hapi and, in earlier projects with Express so I’m already grateful, thank you! My first plan is introducing a layer to make external integration easier so that it could be summed up in a Medium or SO post but maybe not provide a fully supported integration. Unfortunately I can not commit to maintaining one at this point as any Node development is up for question in an effort to improve my own mental health. I’ll only submit a PR if think it would not be a burden on the project.

0reactions
wzrdtalescommented, May 26, 2022

this was fixed once in here https://github.com/apollographql/apollo-server/pull/3268 but never went upstream. Is it safe to say we can neglect graphql-upload if hapi is used and better just go with identified upload requests instead?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hapi/Supports | Fire Emblem Wiki - Fandom
S Support. Hapi: This is quite a place. Whatever you wanted to tell me must be pretty important. Byleth: It is.
Read more >
Help - hapi.dev
Got a question or a problem with your hapi application? Not to worry! The hapi Developer Portal contains plenty of resources to help...
Read more >
Hapi
Hapi. Girl from a forgotten village. Basics · Support · Endings · Activities & Quotes · Gallery. Support Conversations.
Read more >
Hello! How can we help you today? - Hapi
How does Hapi work? How to buy ETFs with Hapi? What do I need to start investing in Hapi? Here we answer the...
Read more >
Database Support - HAPI FHIR Documentation
2Deprecated Support. These databases were previously supported by HAPI FHIR JPA Server, but have since been deprecated, and should not be used. MySQL....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found