You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, all of our factories are generated for a given object type, with the assumption that any fragments/queries that use an object type will need a subset of the fields, so the object type, being the superset of fields, will always be able to fulfill any given fragment/query.
However, this assumption doesn't hold true for fragments that use aliases.
We've happened to fix this for the top-level response of queries in our sister library:
But it'd be good to handle it for non-top-level fragments as well.
We could potentially detect fragments that use aliases, and then for those fragments generate special newMyFragment types, that used the aliased names.
The text was updated successfully, but these errors were encountered:
Currently, all of our factories are generated for a given object type, with the assumption that any fragments/queries that use an object type will need a subset of the fields, so the object type, being the superset of fields, will always be able to fulfill any given fragment/query.
However, this assumption doesn't hold true for fragments that use aliases.
We've happened to fix this for the top-level response of queries in our sister library:
homebound-team/graphql-typescript-response-factories#20
But it'd be good to handle it for non-top-level fragments as well.
We could potentially detect fragments that use aliases, and then for those fragments generate special
newMyFragment
types, that used the aliased names.The text was updated successfully, but these errors were encountered: