-
Notifications
You must be signed in to change notification settings - Fork 737
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
Duplicate entries in __mergedSources
#3321
Comments
@Iron-Ham, did you have any luck working with the schema we spoke about last week to reproduce this yet? |
So that this isn't a black-box for other impacted folks: Calvin and I have been sharing information via private channels in order to try and track down this issue. It proved quite difficult to reproduce outside of When applying that branch to a fork of 1.7.1 (as that's the current version we are using internally at GitHub), we hit some debugging logs that seem to support the general hypothesis: 1.7.1 Logs
Examining the first error statement, and adding some new lines where I think they belong (please correct me on this one if my assumptions are wrong @calvincestari), we're left with:
When applied to the 1.8.x Logs
Adding newlines to the first output, as before, yields:
|
Thanks @Iron-Ham.
Yup, you've broken it up correctly and it looks like we are indeed getting duplicates in the set - which should not be happening! |
When ran again with additional debugging, we get the following: Logs
Cleaned first result:
Full Logs:
With these more detailed logs, we still see no difference. |
@Iron-Ham, I know we weren't able to come up with a reproduction case for this yet. Are you still experiencing this bug? |
Apologies for the late response, It's still reproducible as we haven't upgraded beyond 1.7.1 yet, but I haven't verified this behavior on the current release. I'm happy to have this closed out unless it pops up again – in case it does, future readers will see a workaround above. |
Yeah, I'm still stumped on this one. I'll close it out and let's keep an eye on it as @AnthonyMDev works through the merged fields work since that touches much of the logic that would be responsible for this bug. |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better. |
Summary
I've noticed that we occasionally get duplicate entries in merged sources of generated files. It often takes the form of:
Note that this has been a bug in some form since at least 1.2.0. In previous versions, this was a rare event. In 1.7.1, it's a certainty.
Version
1.7.1
Steps to reproduce the behavior
I've been able to reliably reproduce this by having both an in-line fragment on a member of a union type and a named fragment that relies on the same underlying type within the same selection set:
In this instance:
MyUnionType
is a union type that includesUser
UserListItemFragment
is a named fragment onUser
WORKAROUND:
Instead of structuring your selection as above, structure it like so:
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: