-
Notifications
You must be signed in to change notification settings - Fork 749
Open
Milestone
Description
Question
Just wanted to confirm that that generated code from Apollo iOS 2.0 is not expected to support "Default Actor Isolation: MainActor" ?
I just created a brand new project and the generated code was failing with the following compile errors:
SignInMutation.graphql.swift:31:12 Main actor-isolated conformance of 'MySchema.SignInMutation.Data' to 'Hashable' cannot satisfy conformance requirement for a 'Sendable' type parameter 'Self'
SignInMutation.graphql.swift:31:12 Main actor-isolated conformance of 'MySchema.SignInMutation.Data' to 'Hashable' cannot satisfy conformance requirement for a 'Sendable' type parameter 'Self'
SignInMutation.graphql.swift:31:12 Type 'MySchema.SignInMutation.Data' does not conform to protocol 'SelectionSet'
SignInMutation.graphql.swift:31:12 Type 'MySchema.SignInMutation.Data' does not conform to protocol 'SelectionSetEntityValue'
SignInMutation.graphql.swift:52:14 Main actor-isolated conformance of 'MySchema.SignInMutation.Data.SignInWithPassword' to 'Hashable' cannot satisfy conformance requirement for a 'Sendable' type parameter 'Self'
SignInMutation.graphql.swift:52:14 Main actor-isolated conformance of 'MySchema.SignInMutation.Data.SignInWithPassword' to 'Hashable' cannot satisfy conformance requirement for a 'Sendable' type parameter 'Self'
SignInMutation.graphql.swift:52:14 Type 'MySchema.SignInMutation.Data.SignInWithPassword' does not conform to protocol 'SelectionSet'
SignInMutation.graphql.swift:52:14 Type 'MySchema.SignInMutation.Data.SignInWithPassword' does not conform to protocol 'SelectionSetEntityValue'
Changing "Default Actor Isolation" from MainActor to nonisolated fixed the issue. I couldn't find any reference to this in any of the docs. Maybe this is well understood by iOS devs but I have not done any iOS development for several years so I'm a bit out of the loop.
lin72h and shawnyu5
Metadata
Metadata
Assignees
Labels
No labels