-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fragment can't be imported more than once #1
Comments
I'm not sure I understand the problem. I've definitely reused fragments in my apps before. Do you have an example query that fails? |
Yeah! So for example, if there is a "tree" of imports like this:
an error occurs because I'm kind of new to GraphQL but it seems like importing Making sure not to import a fragment multiple times becomes challenging with many queries and fragments, where you are importing a given fragment many times from many different queries. |
@alexlafroscia Ah I see - yeah I don't think I've ever had that sort of construct in my app. I'll be happy to look at a PR if you can include a failing test case. Thanks |
Sure thing 👍 |
@alexlafroscia Is this still a problem for you now that #9 has been merged? |
I don't really have a good way to test this anymore -- I'm no longer at the company where we were running into this. @jasonmit or @offirgolan might be able to follow up and check it out! |
I noticed that a particular fragment can't be imported more than once.
This becomes a bit confusing in cases where a fragment imports a fragment. I think importing the fragment a second time should result in a no-op rather than an error around the fragment being defined more than once.
Is this something you'd be interested in a PR to fix? If so, I would be happy to put one together!
The text was updated successfully, but these errors were encountered: