Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Export parseBody #121

Closed
wants to merge 1 commit into from
Closed

Conversation

stephenbaldwin
Copy link

parseBody handles complexities in deriving the params from POST requests. It should be exposed to allow for applications and middleware to have access to params like "query" and "operationName" without having to reimplement the logic already defined in parseBody.

@ghost
Copy link

ghost commented Sep 16, 2016

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

`parseBody` handles complexities in deriving the params from POST requests. It should be exposed to allow for applications and middleware to have access to params like "query" and "operationName" without having to reimplement the logic already defined in `parseBody`.
@ghost
Copy link

ghost commented Sep 17, 2016

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@lacker
Copy link
Contributor

lacker commented Sep 19, 2016

IMO this seems useful - you do want middleware to have access to things like the query and the operation name for logging. It probably needs some documentation & tests, though, because if we're exposing it, it's important we don't break it. Could you add some?

@stephenbaldwin
Copy link
Author

Sure thing @lacker

@ghost ghost added the CLA Signed label Sep 19, 2016
@leebyron
Copy link
Contributor

leebyron commented Nov 2, 2016

I think this is a good idea, but I think this particular function is a bit low-level since it doesn't do anything GraphQL specific per-se, instead what you might be looking for is a function that given a request gives you back the GraphQL request details.

I can prep a change that adds this because I agree it would be useful.

@leebyron leebyron mentioned this pull request Nov 2, 2016
@leebyron leebyron closed this in #150 Nov 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants