Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sendable types #3291

Open
calvincestari opened this issue Nov 22, 2023 · 4 comments
Open

Sendable types #3291

calvincestari opened this issue Nov 22, 2023 · 4 comments
Labels
feature New addition or enhancement to existing solutions networking-stack

Comments

@calvincestari
Copy link
Member

calvincestari commented Nov 22, 2023

Use case

Ensure that schema generated types, such as generated enums can conform to Sendable.

Describe the solution you'd like

More context in https://apollograph.slack.com/archives/C049FKX5N74/p1700467655099039

Original context is for generated types to conform to Sendable something like this:

// @generated
// This file was automatically generated and should not be edited.

import Apollo

public extension SomeNamespace {
  enum SomeType: String, EnumType {
    case a = "A"
    case b = "B"
    case c = "C"
  }
}

becomes..

// @generated
// This file was automatically generated and should not be edited.

import Apollo

public extension SomeNamespace {
  enum SomeType: String, EnumType, Sendable {
    case a = "A"
    case b = "B"
    case c = "C"
  }
}
@calvincestari calvincestari added feature New addition or enhancement to existing solutions networking-stack labels Nov 22, 2023
@calvincestari calvincestari added this to the Release 2.0 milestone Nov 22, 2023
@vsanthanam
Copy link
Contributor

Would be curious to know if some of this can be adopted earlier than the eventual 2.0 release -- I think at the minimum the immutable generated types, as well as configuration enums like CachePolicy can add conformance without any actual implementation changes to the types themselves.

@dfed
Copy link

dfed commented Feb 20, 2024

Is the Apollo graph slack something that external folk can join? I'd love to have a sense of where you're going with Swift Concurrency so I can design my abstractions in a future-proofed way.

@calvincestari
Copy link
Member Author

calvincestari commented Feb 20, 2024

Is the Apollo graph slack something that external folk can join?

Not the org internal Slack no. We do have the Apollo GraphQL Community on Discord though which has sections for clients, etc.

I'll edit the description to put the context there instead.

I'd love to have a sense of where you're going with Swift Concurrency so I can design my abstractions in a future-proofed way.

We don't have anything to share right now. It's a bunch of disconnected conversations and issues; it needs to get brought into a single document where we can talk about everything collectively.

@BrentMifsud
Copy link

Is the Apollo graph slack something that external folk can join?

Not the org internal Slack no. We do have the Apollo GraphQL Community on Discord though which has sections for clients, etc.

I'll edit the description to put the context there instead.

I'd love to have a sense of where you're going with Swift Concurrency so I can design my abstractions in a future-proofed way.

We don't have anything to share right now. It's a bunch of disconnected conversations and issues; it needs to get brought into a single document where we can talk about everything collectively.

With the recent announcement of Swift 5.10 being the last Swift 5 release, I think this needs higher priority. As we're likely going to see people using Swift 6 in their code bases starting in June with the Xcode 16 beta.

@AnthonyMDev AnthonyMDev changed the title 2.0 consideration: Sendable types Sendable types Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New addition or enhancement to existing solutions networking-stack
Projects
None yet
Development

No branches or pull requests

5 participants