This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
Fragment generation produces invalid output on fields with parameters #2306
Labels
bug
Something isn't working
"""
@model
"""
type Item {
id: ID!
itemConnection(input: ItemConnectionInput): ItemConnection!
}
input ItemConnectionInput {
id: ID!
}
type ItemConnection {
item: Item
}
I'm using graphback to generate fragments on the client. When a type has field that accepts a parameter the output unfortunately is invalid.
It's a slippery slope but it would be nice if that field is at least ignored to avoid invalid output, maybe with a warning.
Even more slippery, but if we accept that generating fragments is already a special case, then maybe we can also accept to generate variable placeholder based on the field and parameter name.
E.g. itemConnection(input: SomeType) -> fragment field: `input: $itemConnectionInput // could be enumerated, too?
It doesn't look nice to go down that road, on the other hand it can be very helpful for faster prototyping.
The text was updated successfully, but these errors were encountered: