-
Notifications
You must be signed in to change notification settings - Fork 122
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
Allow endpoint-specific field normalization/denormalization #233
Allow endpoint-specific field normalization/denormalization #233
Conversation
@NatPri: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
Codecov Report
@@ Coverage Diff @@
## master #233 +/- ##
=======================================
Coverage 92.71% 92.71%
=======================================
Files 3 3
Lines 412 412
Branches 123 124 +1
=======================================
Hits 382 382
Misses 28 28
Partials 2 2
Continue to review full report at Codecov.
|
I need to figure out what approvals I need to get with my workplace to sign the CLA. I will get back to this PR once I have that sorted out. |
Hey @NatPri -- please let me know if you still want this feature? To go forwards, we need to add some unit tests, and some docs + changelog about it! |
I'm still interested in the feature; once I have some time to handle getting the proper authorizations in place I'll definitely come back to this. If you have a policy against leaving PRs open for too long, however, I can open a new one once I've gotten all my ducks in a row. |
No policy @NatPri -- but I'm going to drop it from the 8.0 milestone for now! Tag me when you want me to take another look! |
@NatPri do you still want to refresh this PR? I'm going to close it otherwise! |
@NatPri -- should you get around to updating this PR, I could ship it soon! We've added perRequest normalization/denormalization since this PR was originally so there's going to be some conflicts. I'm going to close this PR for now, but if you want it reopened, I'm happy to do so. |
Allows clients to specify field name normalization/denormalizations on a per-endpoint basis. This would be useful in cases where (for instance) one endpoint picks PascalCase for their field names and another picks camelCase, and you want to standardize on one or the other in your code.
This could be worked-around using a responseTransformer and per-request denormalizers, but that feels pretty heavy for this specific type of transformation.
Implements the feature described in #232