I work with tdfairbrother and was pairing with him when we tried this out. It compiles fine, it just breaks on the query call with Invariant violation fragment not found.
We do have a query comprised of a big union leveraging fragments per type. Again compilation seems fine but a similar issue when we query. As tdfairbrother mentioned the query doesn’t include the fragment in the query document.
I like how you suggested leveraging coercion. Useful once we can get a successful query response from fragments.
We’re super keen on your work here given some stagnation and delays in other GraphQL binding libraries. We’re very wedded to GraphQL and our paths to upgrading our large code base to Rescript 11 are impeded by this and MUI date pickers.
Cheers