makeShippingMethod no longer defined in 1.0

We’re updating a project from 0.55 → 1.0.5 and have hit a problem. The code used to generate a DeliveryMethod from a shipping method using the generated call CheckoutDetails.DeliveryMethod.makeShippingMethod(). This is no longer generated - what is the replacement?
Thanks in advance.

Hi @AndyB :wave:

Apollo iOS will only generate code according to the schema and the operations defined against that schema. Check your schema and operations for makeShippingMethod to see if it’s defined in there. If it’s not in the schema nor operation definitions then Apollo iOS was never generating it.

I would then check whether you have an extension that defines makeShippingMethod() and check that the type it was extending is still named the same. If the generated Swift type name changed then your extension wouldn’t available.

Hi Calvin,

Under 0.55 the generated code for DeliveryMethod included makeShippingPass() and makeWarehouse() functions for creating instances of either of the two selections that were included in it as a union (if you see what I mean). The handling of unions seems to have changed a lot in the upgrade to 1.0.

We have found a workaround (we think) so this isn’t the pressing problem it was but it would be good to know a good upgrade pattern.