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

Rethink usage tracking of union members for Hive App UI #3817

Open
Tracked by #3858
n1ru4l opened this issue Jan 17, 2024 · 0 comments · May be fixed by #3766
Open
Tracked by #3858

Rethink usage tracking of union members for Hive App UI #3817

n1ru4l opened this issue Jan 17, 2024 · 0 comments · May be fixed by #3766

Comments

@n1ru4l
Copy link
Collaborator

n1ru4l commented Jan 17, 2024

Union type field usage is shown as 1.8k times.
Clicking on the same field in explorer, shows zero usage

We don’t track members of a union directly, we track types and fields of these members.
Let’s say you have Query.media that resolves Media union, that has TV and Radio members.
When querying Query.media, for Hive does not matter if it’s a union or an interface as you use fragments there anyway.
These fragments (spreads or inlines) tell Hive what you are querying there.

When querying <Union>.__typename, we do mark the union as used though. This way we “lock” the union type, so whenever you modify its members, we treat it as a breaking change.
It’s not ideal, but it’s only affecting the UI part of Hive.

We will double-think if tracking the names of union members makes sense and won’t cause damage.

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 a pull request may close this issue.

1 participant