apollo-client: Fragment already exists warning
Steps to reproduce
- Create a named fragment
- Use it in multiple places
Example of usage
const query = gql`
query Goal($id: [Int!]) {
goals(id: $id) {
...Goal
}
}
${Goal.fragments.goal}
`;
Expected
No warnings
Result
Warning that the fragment already exists
Info
app@1.0.0
├── apollo-client@0.5.5
├── graphql-tag@0.1.17
└── react-apollo@0.6.0
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 22 (16 by maintainers)
Commits related to this issue
- Remove outdated note about warning See https://github.com/apollographql/apollo-client/issues/940 — committed to tmeasday/react-docs by deleted user 7 years ago
- Remove outdated note about warning See https://github.com/apollographql/apollo-client/issues/940 — committed to apollographql/apollo-client by deleted user 7 years ago
- Actually remove `graphql-fragments` And use temporary workaround for https://github.com/apollostack/apollo-client/issues/940 — committed to honestdeveloper1985/myrepo by honestdeveloper1985 8 years ago
- Don't use confusing fragment warning workaround.. Let's just wait for https://github.com/apollostack/apollo-client/issues/940 to be resolved — committed to honestdeveloper1985/myrepo by honestdeveloper1985 8 years ago
0.6 and 0.7 have been released which should include this fix 🎉
Let us know if you are still seeing problems.
@tmeasday yeah, we haven’t removed it yet, but it’s slated for 0.6, which I’m planning to release next week with a bunch of new features and an update to the typings.
Correct.