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

release: 0.52.0 #2370

Merged
merged 4 commits into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change log

## v0.52.0
- **Add codegen option for excludes**: There is a new property on the codegen configuration options to allow files matching the pattern to be excluded, in the case they are found in the `includes` path. [#2205](https://github.com/apollographql/apollo-ios/pull/2205) - _Thanks to [@bannzai](https://github.com/bannzai) for the contribution!_
- **Fixed - Using the `graphql_transport_ws` protocol could result in `4400` errors from the server**: The correct protocol message is now being sent to the server to end communication. [#2320](https://github.com/apollographql/apollo-ios/pull/2320)
- **Replace `print` statement with `CodegenLogger.log`**: All codegen output is logged with `CodegenLogger` which can be disabled if needed. [#2348](https://github.com/apollographql/apollo-ios/issues/2348) - _Thanks to [@hiltonc](https://github.com/hiltonc) for the contribution!_
- **Expose `GraphQLResultError` path string**: Adds a new publicly available computed property to `GraphQLResultError` which just exposes the `path` description. [#2361](https://github.com/apollographql/apollo-ios/pull/2361) - _Thanks to [@joshuashroyer-toast](https://github.com/joshuashroyer-toast) for the contribution!_

## v0.51.2
- **Fixed - APQ Retrying Failing in 0.51.1**: Fixes a bug introduced in the last version that broke APQs. _Thanks to [Kyle Browning](https://github.com/kylebrowning) for bringing this to our attention._

Expand Down
2 changes: 1 addition & 1 deletion Configuration/Shared/Project-Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 0.51.2
CURRENT_PROJECT_VERSION = 0.52.0
55 changes: 14 additions & 41 deletions SwiftScripts/Package.resolved
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
{
"object": {
"pins": [
{
"package": "Commandant",
"repositoryURL": "https://github.com/Carthage/Commandant.git",
"state": {
"branch": null,
"revision": "ab68611013dec67413628ac87c1f29e8427bc8e4",
"version": "0.17.0"
}
},
{
"package": "MarkdownGenerator",
"repositoryURL": "https://github.com/eneko/MarkdownGenerator.git",
Expand All @@ -19,15 +10,6 @@
"version": "0.5.0"
}
},
{
"package": "Nimble",
"repositoryURL": "https://github.com/Quick/Nimble.git",
"state": {
"branch": null,
"revision": "72f5a90d573f7f7d70aa6b8ad84b3e1e02eabb4d",
"version": "8.0.9"
}
},
{
"package": "ProcessRunner",
"repositoryURL": "https://github.com/eneko/ProcessRunner.git",
Expand All @@ -37,76 +19,67 @@
"version": "1.1.0"
}
},
{
"package": "Quick",
"repositoryURL": "https://github.com/Quick/Quick.git",
"state": {
"branch": null,
"revision": "09b3becb37cb2163919a3842a4c5fa6ec7130792",
"version": "2.2.1"
}
},
{
"package": "Rainbow",
"repositoryURL": "https://github.com/onevcat/Rainbow",
"state": {
"branch": null,
"revision": "9c52c1952e9b2305d4507cf473392ac2d7c9b155",
"version": "3.1.5"
"revision": "626c3d4b6b55354b4af3aa309f998fae9b31a3d9",
"version": "3.2.0"
}
},
{
"package": "SourceDocs",
"repositoryURL": "https://github.com/eneko/SourceDocs.git",
"state": {
"branch": null,
"revision": "3a38adfe18ca73dfc2136b4b8c49407d1a812d50",
"version": "2.0.0"
"revision": "fb0e489e3a26c789aad3adbe43e2169f50f485e8",
"version": "2.0.1"
}
},
{
"package": "SourceKitten",
"repositoryURL": "https://github.com/jpsim/SourceKitten.git",
"state": {
"branch": null,
"revision": "77a4dbbb477a8110eb8765e3c44c70fb4929098f",
"version": "0.29.0"
"revision": "817dfa6f2e09b0476f3a6c9dbc035991f02f0241",
"version": "0.32.0"
}
},
{
"package": "SQLite.swift",
"repositoryURL": "https://github.com/stephencelis/SQLite.swift.git",
"state": {
"branch": null,
"revision": "60a65015f6402b7c34b9a924f755ca0a73afeeaa",
"version": "0.13.1"
"revision": "4d543d811ee644fa4cc4bfa0be996b4dd6ba0f54",
"version": "0.13.3"
}
},
{
"package": "swift-argument-parser",
"repositoryURL": "https://github.com/apple/swift-argument-parser.git",
"state": {
"branch": null,
"revision": "e1465042f195f374b94f915ba8ca49de24300a0d",
"version": "1.0.2"
"revision": "e394bf350e38cb100b6bc4172834770ede1b7232",
"version": "1.0.3"
}
},
{
"package": "SWXMLHash",
"repositoryURL": "https://github.com/drmohundro/SWXMLHash.git",
"state": {
"branch": null,
"revision": "a4931e5c3bafbedeb1601d3bb76bbe835c6d475a",
"version": "5.0.1"
"revision": "6469881a3f30417c5bb02404ea4b69207f297592",
"version": "6.0.0"
}
},
{
"package": "Yams",
"repositoryURL": "https://github.com/jpsim/Yams.git",
"state": {
"branch": null,
"revision": "c947a306d2e80ecb2c0859047b35c73b8e1ca27f",
"version": "2.0.0"
"revision": "9ff1cc9327586db4e0c8f46f064b6a82ec1566fa",
"version": "4.0.6"
}
}
]
Expand Down
43 changes: 6 additions & 37 deletions docs/source/api/Apollo/classes/JSONRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,53 +39,22 @@ public let useGETForPersistedQueryRetry: Bool
public var isPersistedQueryRetry = false
```

### `serializationFormat`
### `body`

```swift
public let serializationFormat = JSONSerializationFormat.self
public var body: GraphQLMap
```

### `sendOperationIdentifier`
### `serializationFormat`

```swift
open var sendOperationIdentifier: Bool
public let serializationFormat = JSONSerializationFormat.self
```

### `body`
### `sendOperationIdentifier`

```swift
public private(set) lazy var body: GraphQLMap = {
let sendQueryDocument: Bool
let autoPersistQueries: Bool
switch operation.operationType {
case .query:
if isPersistedQueryRetry {
sendQueryDocument = true
autoPersistQueries = true
} else {
sendQueryDocument = !self.autoPersistQueries
autoPersistQueries = self.autoPersistQueries
}
case .mutation:
if isPersistedQueryRetry {
sendQueryDocument = true
autoPersistQueries = true
} else {
sendQueryDocument = !self.autoPersistQueries
autoPersistQueries = self.autoPersistQueries
}
default:
sendQueryDocument = true
autoPersistQueries = false
}

let body = self.requestBodyCreator.requestBody(for: operation,
sendOperationIdentifiers: self.sendOperationIdentifier,
sendQueryDocument: sendQueryDocument,
autoPersistQuery: autoPersistQueries)

return body
}()
open var sendOperationIdentifier: Bool
```

## Methods
Expand Down
6 changes: 6 additions & 0 deletions docs/source/api/Apollo/structs/GraphQLResultError.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ public struct GraphQLResultError: Error, LocalizedError
An error which has occurred in processing a GraphQLResult

## Properties
### `pathString`

```swift
public var pathString: String
```

### `underlying`

```swift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ public struct ApolloCodegenOptions
An object to hold all the various options for running codegen

## Methods
### `init(codegenEngine:includes:mergeInFieldsFromFragmentSpreads:modifier:namespace:omitDeprecatedEnumCases:only:operationIDsURL:outputFormat:customScalarFormat:suppressSwiftMultilineStringLiterals:urlToSchemaFile:downloadTimeout:)`
### `init(codegenEngine:includes:excludes:mergeInFieldsFromFragmentSpreads:modifier:namespace:omitDeprecatedEnumCases:only:operationIDsURL:outputFormat:customScalarFormat:suppressSwiftMultilineStringLiterals:urlToSchemaFile:downloadTimeout:)`

```swift
public init(codegenEngine: CodeGenerationEngine = .default,
includes: String = "./**/*.graphql",
excludes: String? = nil,
mergeInFieldsFromFragmentSpreads: Bool = true,
modifier: AccessModifier = .public,
namespace: String? = nil,
Expand All @@ -32,6 +33,7 @@ Designated initializer.
- Parameters:
- codegenEngine: The code generation engine to use. Defaults to `CodeGenerationEngine.default`
- includes: Glob of files to search for GraphQL operations. This should be used to find queries *and* any client schema extensions. Defaults to `./**/*.graphql`, which will search for `.graphql` files throughout all subfolders of the folder where the script is run.
- excludes: Glob of files to exclude for GraphQL operations. Caveat: this doesn't currently work in watch mode
- mergeInFieldsFromFragmentSpreads: Set true to merge fragment fields onto its enclosing type. Defaults to true.
- modifier: [EXPERIMENTAL SWIFT CODEGEN ONLY] - The access modifier to use on everything created by this tool. Defaults to `.public`.
- namespace: [optional] The namespace to emit generated code into. Defaults to nil.
Expand Down