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 to override fieldNameNormalizer per request #253

Merged
merged 7 commits into from
Jan 5, 2022

Conversation

alfondotnet
Copy link
Contributor

  • feature
  • blocking

For some reason fieldNameNormalizer is not override-able per request.

@alfondotnet alfondotnet changed the title Allows to override fieldNameNormalizer as per request basis also Allows to override fieldNameNormalizer per request basis Dec 11, 2021
@alfondotnet alfondotnet changed the title Allows to override fieldNameNormalizer per request basis Allows to override fieldNameNormalizer per request Dec 11, 2021
@alfondotnet alfondotnet changed the title Allows to override fieldNameNormalizer per request Allow to override fieldNameNormalizer per request Dec 11, 2021
@alfondotnet
Copy link
Contributor Author

Hey @fbartho! any chance this would get merged?

@fbartho fbartho added this to the v0.next milestone Jan 5, 2022
@fbartho
Copy link
Collaborator

fbartho commented Jan 5, 2022

Thanks for the PR @alfondotnet! I resolved the trivial conflicts, and will be merging this shortly.

It'll get shipped in v0.9.0 -- please ping me if you're in any particular rush to get that out!

fbartho added a commit that referenced this pull request Jan 5, 2022
@fbartho fbartho merged commit aa1eba9 into apollographql:master Jan 5, 2022
@alfondotnet
Copy link
Contributor Author

alfondotnet commented Jan 5, 2022

It'll get shipped in v0.9.0 -- please ping me if you're in any particular rush to get that out!

@fbartho It's fine, no rush. Been running a fork with this change for a while. Thanks for merging 🙏

@fbartho
Copy link
Collaborator

fbartho commented Jan 5, 2022

Shipped in the pre-release of 0.9.0-rc.1 please advise if you have any issues

@fbartho
Copy link
Collaborator

fbartho commented Nov 15, 2022

Shipped this in v0.9.0! -- Enjoy! https://www.npmjs.com/package/apollo-link-rest/v/0.9.0

@alfondotnet
Copy link
Contributor Author

alfondotnet commented Nov 17, 2022

@fbartho it works :), have seen a non related regression where if I had a useQuery with a variable: formSerializer: identityFn passed in to the fieldNameNormalizer, and then a refetchQueries to refetch that query, the variable had to be again set explicitly:

    refetchQueries: [
      { query: PROJECT_APP_QUERY, variables: appConfigRefetchVariables },
      {
        query: PROJECT_QUERY,
        variables: {
          projectId: appConfigRefetchVariables.projectId,
          formSerializer: identityFn,
        },
      },

But I take that as a change in how the refetchQueries work (I upgraded also apollo client from "3.4.16" to "3.7.1"). Anyway, thanks for shipping this!

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.

2 participants