DEV Community

loading...

Discussion on: GraphQL Fragments: Reuse and Variables

Collapse
javiermendonca profile image
Javier Mendonça

What about reusing fragment comparisonFields defined in file A in file B? I am having certain fragment that could be commonly shared on different query definitions but still haven't figured out a way to share them across queries.

I am doing this on Android, no Apollo though. I got the idea to have those common fragments defined on separate files and then append them to the query files on a gradle task, perhaps it's overengineered? Thanks