Shopify / tapioca

The swiss army knife of RBI generation
MIT License
728 stars 121 forks source link

Generate correct return types in IdentityCache compiler #1939

Closed egiurleo closed 3 months ago

egiurleo commented 3 months ago

There is a difference in behavior between the return types of the existing IdentityCache compiler and how IdentityCache compiler actually works.

In the aliased fetch methods, IdentityCache will return an array unless the field has the unique property, even if it is not a multi-type. Previously, our IdentityCache compiler was always setting the return type as a single object for those methods.