urql-graphql / urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
https://urql.dev/goto/docs
MIT License
8.63k stars 451 forks source link

feat(populate): alias fields with arguments #3473

Closed JoviDeCroock closed 6 months ago

JoviDeCroock commented 9 months ago

Relates to https://github.com/urql-graphql/urql/issues/964

Summary

This adds aliasing to fields that we have seen before with arguments, this checks whether we've seen a certain type + field before and if so it will be aliased. This however can become problematic in the case of interfaces, we might need to either always alias (breaking change), or check for possible-types who have queried this before... Not sure whether we want to solve this off the bat but just spitballing idea's

changeset-bot[bot] commented 9 months ago

🦋 Changeset detected

Latest commit: 4c18bbb05709f9e9b47a60ab790fcfa825c695e4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------------------- | ----- | | @urql/exchange-populate | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR