From d93568fb58f3eed95c2a0068d830a39a6e9d6c97 Mon Sep 17 00:00:00 2001 From: Calvin Cestari Date: Wed, 17 Nov 2021 12:51:58 -0800 Subject: [PATCH] Release `0.50.0` (#2031) * Update version number for release * Updated changelog for release * Update documentation for release changes * Update changelog for #2015 --- CHANGELOG.md | 9 +++++ Configuration/Shared/Project-Version.xcconfig | 2 +- .../source/api/Apollo/structs/GraphQLField.md | 6 ++++ docs/source/api/ApolloCodegenLib/README.md | 1 + ...emaDownloadConfiguration.DownloadMethod.md | 4 +-- ...lloSchemaDownloader.SchemaDownloadError.md | 12 +++++++ .../enums/DownloadMethod.HTTPMethod.md | 35 +++++++++++++++++++ 7 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 docs/source/api/ApolloCodegenLib/enums/DownloadMethod.HTTPMethod.md diff --git a/CHANGELOG.md b/CHANGELOG.md index ee7703a2e5..79a31277e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Change log +## v0.50.0 +- **Dropped SPM support for Swift 5.2**: The minimum version of the Swift tools and language compatibilty required to process the SPM manifest is Swift 5.3. This means a minimum of Xcode version 12 is required for Swift Package Manager support. [#1992](https://github.com/apollographql/apollo-ios/pull/1992) +- **Removed unnecessary assertion failure**: The completion handler on `returnResultAsyncIfNeeded` is defined as optional but if not included would cause debug builds to crash with an `assertionFailure` in the case of a `failure` of the `Result`. [#2005](https://github.com/apollographql/apollo-ios/pull/2005) - _Thank you to [Richard Topchii](https://github.com/richardtop) for raising this issue!_ +- **`CachePolicy.default` is now a stored property**: It is now easier to configure a different default value for the `CachePolicy` property on any `ApolloClient` instance instead of having to override it in a subclass. [#1998](https://github.com/apollographql/apollo-ios/pull/1998) - _Thank you to [Tiziano Coroneo](https://github.com/TizianoCoroneo) for the contribution!_ +- **Exposed `cacheKey` function as `public`**: The access modifier of this function on `GraphQLField` has changed from `internal` to `public`. It is not recommended to rely on internal behaviour of the cache, and this is subject to change in future major versions. [#2014](https://github.com/apollographql/apollo-ios/pull/2014) - _Thank you to [Peter Potrebic](https://github.com/potrebic) for the discussion!_ +- **GET method support for `ApolloSchemaDownloader`**: Introspection-based schema downloads can now be queried using a GET request. [#2010](https://github.com/apollographql/apollo-ios/pull/2010) - _Thank you to [Mike Pitre](https://github.com/mikepitre) for the contribution!_ +- **Updated to version 2.33.9 of the Apollo CLI**: This update will add `__typename` fields to inline fragments in operations to match the output from the `client:push` CLI command which used for operation safelisting. This should not affect the behaviour of your operations. [#2028](https://github.com/apollographql/apollo-ios/pull/2028). +- **Updated to version 0.13.1 of SQLite.swift**: This update brings in some iOS 14 fixes and new table functionality such as `upsert` and `insertMany`. [#2015](https://github.com/apollographql/apollo-ios/pull/2015) - _Thank you to [Hesham Salman](https://github.com/Iron-Ham) for the contribution._ + ## v0.49.1 - **`ApolloSchemaDownloadConfiguration.HTTPHeader` initializer was not public**: The struct initializer that Swift automatically generates is marked with the `internal` access level, which meant that custom HTTP headers could not be added to an instance of `ApolloSchemaDownloadConfiguration`. [#1962](https://github.com/apollographql/apollo-ios/pull/1962) - _Thank you to [Nikolai Sivertsen](https://github.com/nsivertsen) for the contribution!_ - **Documentation update**: Fixed an inline code block that had specified language where such specification is not supported. [#1954](https://github.com/apollographql/apollo-ios/pull/1954) - _Thank you to [Kim Røen](https://github.com/kimroen) for the contribution!_ diff --git a/Configuration/Shared/Project-Version.xcconfig b/Configuration/Shared/Project-Version.xcconfig index b7d90a3d3c..dbbea639e9 100644 --- a/Configuration/Shared/Project-Version.xcconfig +++ b/Configuration/Shared/Project-Version.xcconfig @@ -1 +1 @@ -CURRENT_PROJECT_VERSION = 0.49.1 +CURRENT_PROJECT_VERSION = 0.50.0 diff --git a/docs/source/api/Apollo/structs/GraphQLField.md b/docs/source/api/Apollo/structs/GraphQLField.md index 568d755b85..5100270cfd 100644 --- a/docs/source/api/Apollo/structs/GraphQLField.md +++ b/docs/source/api/Apollo/structs/GraphQLField.md @@ -15,3 +15,9 @@ public init(_ name: String, arguments: FieldArguments? = nil, type: GraphQLOutputType) ``` + +### `cacheKey(with:)` + +```swift +public func cacheKey(with variables: [String: JSONEncodable]?) throws -> String +``` diff --git a/docs/source/api/ApolloCodegenLib/README.md b/docs/source/api/ApolloCodegenLib/README.md index 8e913b03fe..f8da293d44 100644 --- a/docs/source/api/ApolloCodegenLib/README.md +++ b/docs/source/api/ApolloCodegenLib/README.md @@ -61,6 +61,7 @@ - [CodegenLogger.LogLevel](enums/CodegenLogger.LogLevel/) - [CompilationResult.OperationType](enums/CompilationResult.OperationType/) - [CompilationResult.Selection](enums/CompilationResult.Selection/) +- [DownloadMethod.HTTPMethod](enums/DownloadMethod.HTTPMethod/) - [GraphQLType](enums/GraphQLType/) ## Extensions diff --git a/docs/source/api/ApolloCodegenLib/enums/ApolloSchemaDownloadConfiguration.DownloadMethod.md b/docs/source/api/ApolloCodegenLib/enums/ApolloSchemaDownloadConfiguration.DownloadMethod.md index 76ff4da989..9a315519d2 100644 --- a/docs/source/api/ApolloCodegenLib/enums/ApolloSchemaDownloadConfiguration.DownloadMethod.md +++ b/docs/source/api/ApolloCodegenLib/enums/ApolloSchemaDownloadConfiguration.DownloadMethod.md @@ -17,10 +17,10 @@ case apolloRegistry(_ settings: ApolloRegistrySettings) The Apollo Schema Registry, which serves as a central hub for managing your graph. -### `introspection(endpointURL:)` +### `introspection(endpointURL:httpMethod:)` ```swift -case introspection(endpointURL: URL) +case introspection(endpointURL: URL, httpMethod: HTTPMethod = .POST) ``` GraphQL Introspection connecting to the specified URL. diff --git a/docs/source/api/ApolloCodegenLib/enums/ApolloSchemaDownloader.SchemaDownloadError.md b/docs/source/api/ApolloCodegenLib/enums/ApolloSchemaDownloader.SchemaDownloadError.md index 6c7286994e..5d2d7800e7 100644 --- a/docs/source/api/ApolloCodegenLib/enums/ApolloSchemaDownloader.SchemaDownloadError.md +++ b/docs/source/api/ApolloCodegenLib/enums/ApolloSchemaDownloader.SchemaDownloadError.md @@ -49,6 +49,18 @@ case couldNotCreateSDLDataToWrite(schema: String) case couldNotConvertIntrospectionJSONToSDL(underlying: Error) ``` +### `couldNotCreateURLComponentsFromEndpointURL(url:)` + +```swift +case couldNotCreateURLComponentsFromEndpointURL(url: URL) +``` + +### `couldNotGetURLFromURLComponents(components:)` + +```swift +case couldNotGetURLFromURLComponents(components: URLComponents) +``` + ## Properties ### `errorDescription` diff --git a/docs/source/api/ApolloCodegenLib/enums/DownloadMethod.HTTPMethod.md b/docs/source/api/ApolloCodegenLib/enums/DownloadMethod.HTTPMethod.md new file mode 100644 index 0000000000..349233d7a9 --- /dev/null +++ b/docs/source/api/ApolloCodegenLib/enums/DownloadMethod.HTTPMethod.md @@ -0,0 +1,35 @@ +**ENUM** + +# `DownloadMethod.HTTPMethod` + +```swift +public enum HTTPMethod: Equatable, CustomStringConvertible +``` + +The HTTP request method. This is an option on Introspection schema downloads only. Apollo Registry downloads are always +POST requests. + +## Cases +### `POST` + +```swift +case POST +``` + +Use POST for HTTP requests. This is the default for GraphQL. + +### `GET(queryParameterName:)` + +```swift +case GET(queryParameterName: String) +``` + +Use GET for HTTP requests with the GraphQL query being sent in the query string parameter named in +`queryParameterName`. + +## Properties +### `description` + +```swift +public var description: String +```