Skip to content
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

Closed

Conversation

NatPri
Copy link

@NatPri NatPri commented Oct 2, 2019

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

@apollo-cla
Copy link

@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-io
Copy link

codecov-io commented Oct 2, 2019

Codecov Report

Merging #233 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           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
Impacted Files Coverage Δ
src/restLink.ts 92.48% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ed4e83...2cc8728. Read the comment docs.

@NatPri
Copy link
Author

NatPri commented Oct 2, 2019

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.

@fbartho
Copy link
Collaborator

fbartho commented Nov 5, 2019

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!

@fbartho fbartho added this to the 0.8.0 milestone Nov 5, 2019
@NatPri
Copy link
Author

NatPri commented Nov 6, 2019

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.

@fbartho
Copy link
Collaborator

fbartho commented Mar 5, 2020

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!

@fbartho fbartho removed this from the 0.8.0 milestone Mar 5, 2020
@fbartho
Copy link
Collaborator

fbartho commented Jan 5, 2022

@NatPri do you still want to refresh this PR? I'm going to close it otherwise!

@fbartho
Copy link
Collaborator

fbartho commented Jan 5, 2022

@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.

@fbartho fbartho closed this Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants