Open
Description
When generating a client using fragments and lots of similar queries that use the same fragment it leads to lots of the same structs being generated.
Ideally there would be a seperate Fragments struct that contains the defined fragments.
I.e the following queries would both share the same response structs as they use the same fragment:
fragment LoadInfo on Load {
loadId
jobContainerId
name
loadPlanStatus
journey {
journeyId
}
}
query loadById($load: Int!) {
loadByID(loadId: $load) {
...LoadInfo
}
}
query loadBySupplier($supplier: String!, $after: LocalDateTime!) {
loadsBySupplierId(supplierCode: $supplier, after: $after) {
...LoadInfo
}
}
Not sure how feasible that is, but I think something similar is done for input types and enums?
Metadata
Metadata
Assignees
Labels
No labels