Error when migrating from 0.39 to 1.0.5

Hello All,
I am migrating Apollo from 0.39 to 1.0.5, Then I noticed that lots of errors in *API.swift files. See below
“Cannot find type GrapQLSelectionSet in scope”
“Cannot find type GrapQLSelection in scope”
“Cannot find type ResultMap in scope”
Is 1.0.5 is backward compatbile with 0.39 Apollo generated swift files?
Should I convert old API.swift to new 1.0.5 compatbile *.graphql.swift file ?
Appreciate any response on this

Vijay

Hi Vijay,

For context I refer to 0.x versions as “legacy” below.

Is 1.0.5 is backward compatbile with 0.39 Apollo generated swift files?
Should I convert old API.swift to new 1.0.5 compatbile *.graphql.swift file ?

No, you cannot use legacy generated files with any 1.x Apollo iOS versions. Version 1.0 was a rewrite of the code generation engine in Swift and addressing feedback we’d received on the legacy versions, thus the generated models are quite different with many improvements.

Yes, you will need to regenerate your operation models. If you haven’t yet I recommend you read the documentation about the new code generation and we have a migration guide that will help your migration.