Skip to content

Commit

Permalink
Prepare for Alpha 3 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyMDev committed Apr 12, 2022
1 parent 2948d90 commit f4fb479
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
39 changes: 38 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,41 @@
# Change log
# Change Log

## v1.0.0-alpha.3

This is the third Alpha Release of Apollo iOS 1.0. This first major version will include a new code generation engine, better generated models, and many syntax and performance improvements across the entire library. The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

* **Include/Skip Directives are now supported!**
* Adding `@include/@skip` directives to fields, inline fragments, or fragment spreads will now generate code that respects the optionality of these conditionally included selections.
* **Changed - Generated TypeCase renamed to InlineFragment** These are now used for both type cases and inline fragments that are conditionally included using `@include/@skip` directives.
* **Custom Scalars are now supported!**
* Template Files will be generated for custom scalars. The template files `typealias` each custom scalar to a `String` by default. These generated files can be edited to provide custom functionality for advanced custom scalars. Custom scalar template files that have been edited will not be overwritten on later code generation executions.
* **Improved multi-module support**
* Including your generated code using package managers other than SPM can be done using the `.other` option for `moduleType` in your code generation configuration.
* **Nil Coalescing Operator added to `GraphQLNullable`
* This allows for optional variables to easily be used with `GraphQLNullable` parameters and a default value

```swift
class MyQuery: GraphQLQuery {

var myVar: GraphQLNullable<String>

init(myVar: GraphQLNullable<String> { ... }
// ...
}

let optionalString: String?

// Before

let query = MyQuery(myVar: optionalString.map { .some($0) } ?? .none)

// After
let query = MyQuery(myVar: optionalString ?? .none)
```
* **Fixed - `fragments` not accessible on generated `SelectionSet`s.
* **Fixed - `__typename` is now added to all operation and fragment definitions.
* **Fixed - Missing Generated Interface Types**
* Interface types that were only referenced as an implemented interface of a referenced concrete type were not being generated previously.

## v1.0.0-alpha.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct SwiftPackageManagerModuleTemplate: TemplateRenderer {
.library(name: "\(moduleName)", targets: ["\(moduleName)"]),
],
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-alpha.2"),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-alpha.3"),
],
targets: [
.target(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class SwiftPackageManagerModuleTemplateTests: XCTestCase {
// given
let expected = """
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-alpha.2"),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-alpha.3"),
],
"""
// when
Expand Down

0 comments on commit f4fb479

Please sign in to comment.