github apollographql/apollo-ios 2.1.0

6 hours ago

New

  • WebSocket Transport: Apollo iOS 2.0 now supports WebSocket connections using the graphql-transport-ws protocol for subscriptions, queries, and mutations. See the WebSocket Transport documentation for setup and usage details.
  • Swift 6.2 MainActor default isolation support (#925): Added a markTypesNonisolated codegen option that emits nonisolated on all generated type declarations. This prevents compilation errors when SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor is enabled. The option defaults to true when the codegen tool is compiled with Swift 6.2+.
  • ApolloURLSession delegate injection (#899): Added support for injecting a custom URLSessionTaskDelegate into ApolloURLSession, enabling delegate callback handling. Thank you to @hammy-e for the contribution.

Fixed

  • Fix concurrency issue in compileGraphQLResult (#929): Resolved a Swift compiler crash triggered by async let stack management during code generation in AsyncParsableCommand contexts. Thank you to @m4p for the contribution.

New

  • WebSocket Transport: Apollo iOS 2.0 now supports WebSocket connections using the graphql-transport-ws protocol for subscriptions, queries, and mutations. See the WebSocket Transport documentation for setup and usage details.
  • ApolloURLSession delegate injection (#899): Added support for injecting a custom URLSessionTaskDelegate into ApolloURLSession, enabling delegate callback handling. Thank you to @hammy-e for the contribution.
  • Make JSONRequest.useGetForQueries mutable (#897): The useGetForQueries property on JSONRequest is now a var, allowing interceptors to mutate the request directly instead of copying it. Thank you to @nevil for the contribution.

Fixed

  • Add preflight HTTP header for CSRF prevention (#900): Added the X-Apollo-Operation-Name header to requests to satisfy Apollo Router's CSRF prevention requirements.

Improved

  • Use dictionary for objectType(forTypename:) lookup (#918): Replaced the generated switch statement in SchemaMetadata.objectType(forTypename:) with a static dictionary lookup, improving deserialization performance by ~75% for schemas with many types (4000+). Thank you to @erneestoc for the contribution.

Don't miss a new apollo-ios release

NewReleases is sending notifications on new releases.