Skip to content

Commit

Permalink
Release 1.0.0 beta.2 (#2422)
Browse files Browse the repository at this point in the history
* release: Update versioning for 1.0.0-beta.2

* chore: Updates CHANGELOG for 1.0.0-beta.2

* Update generated documentation

Co-authored-by: Anthony Miller <[email protected]>
  • Loading branch information
calvincestari and AnthonyMDev authored Aug 16, 2022
1 parent 595140a commit 28c6023
Show file tree
Hide file tree
Showing 20 changed files with 1,144 additions and 40 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Change Log

## v1.0.0-beta.2

This is the second Beta Release of Apollo iOS 1.0. The Beta version has full feature parity with the 0.x.x releases. The API is expected to be mostly stable. Some breaking changes may occur due to user feedback prior to General Availability (GA) Release. The Beta does not have complete documentation or usage guides, which will be completed prior to GA.

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.

**Breaking: Changed API for Cache Key Configuration:** Cache Key Resolution is now easier to configure. See `CacheKeyInfo` for examples and documentation.
**Breaking: Changed API for generated Schema Types to support dynamic types** The API for generated schema types now initializes instances of `Object`, `Interface`, and `Union` for each corresponding type in your schema. These are still generated by the code generation engine. This differs from the previous API which generated static types that were subclasses of `Object`, `Interface`, and `Union`. The change provides the API to support the future addition of dynamic types added to your schema at runtime.
**New: Codegen CLI will now automatically create output directories:** You no longer are required to have already created all intermediary directories for your codegen output paths prior to running code generation.
**New: CodegenCLI is built locally with CocoaPods installations:** This is to ensure that the version of the Codegen CLI is the same as ApolloCodegenLib. This behaviour will be extended to Swift Package Manager installations too.
**New: Swift Keywords are escaped when used as names of fields or types in generated objects:** Previously, using Swift keywords (eg. `self`, `protocol`, `Type`) as the names of fields in your operations or types in your schema would cause compilation errors in your generated code. Now, these names will be escaped with backticks to prevent compiler errors. **The names `\_\_data` and `fragments` cannot be used as field names as they conflict with Apollo's generated object APIs** Using these names will result in a validation error being thrown when attempting to run the code generation engine.
**Fixed: Fragments with lowercase names caused compilation errors:** This bug is fixed. Fragments with lowercase names will be correctly uppercased when referencing the generated `Fragment` objects.
**Fixed: Build errors in Xcode 14/Swift 5.7:** The library was updated to support the Swift 5.7 language version. Swift 5.6 is still supported.
**Fixed: Xcode 14 does not support Bitcode:** Starting with Xcode 14, bitcode is no longer required for watchOS and tvOS applications, and the App Store no longer accepts bitcode submissions from Xcode 14.
**Fixed: "No such module `ApolloAPI`" error when using CocoaPods:** The podspec was not configured to import all required source files and some import statements were unnecessary in a CocoaPods environment. A code generation configuration option was added to order to ensure generated files are generated with the correct import statements in a CocoaPods environment. **When generating code for a project that includes `Apollo` via Cocoapods, you must set the `cocoapodsCompatibleImportStatements` option to `true` in your `ApolloCodegenConfiguration`.** When using the Codegen CLI that is built for you during `pod install` the `apollo-ios-cli init` command will default this option to `true`. When building the Codegen CLI in by other method, this option will default to `false`.
**Removed: ApolloUtils target no longer necessary:** The things that used to be shared here are actually no longer shared. There is no code shared between the `Apollo` and `ApolloCodegenLib` targets.
**Removed: ApolloCodegenConfiguration.validation:** This method was incorrectly requiring destination paths to exist before code generation. Once that was removed it was no longer necessary. Any errors that are encountered with destination output paths will be raised during code generation.

## v1.0.0-beta.1

This is the first Beta Release of Apollo iOS 1.0. The Beta version has full feature parity with the 0.x.x releases. The API is expected to be mostly stable. Some breaking changes may occur due to user feedback prior to General Availability (GA) Release. The Beta does not have complete documentation or usage guides, which will be completed prior to GA.
Expand Down
2 changes: 1 addition & 1 deletion CodegenCLI/Sources/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ struct CodegenCLI: ParsableCommand {
static var configuration = CommandConfiguration(
commandName: "apollo-ios-cli",
abstract: "A command line utility for Apollo iOS code generation.",
version: "1.0.0-beta.1",
version: "1.0.0-beta.2",
subcommands: [
Initialize.self,
Generate.self,
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 = 1.0.0-beta.1
CURRENT_PROJECT_VERSION = 1.0.0-beta.2
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ These are the three guiding principles we aim for in each major release:

## 1.0 - _In Beta release phase_

[Beta 1 is available](https://github.com/apollographql/apollo-ios/releases/tag/1.0.0-beta.1), please try it and give us your feedback.
[Beta 2 is available](https://github.com/apollographql/apollo-ios/releases/tag/1.0.0-beta.2), please try it and give us your feedback.

These are the major initiatives planned for 1.0/1.x:

Expand Down
4 changes: 1 addition & 3 deletions Sources/AnimalKingdomAPI/AnimalKingdomAPI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ let package = Package(
.library(name: "AnimalKingdomAPI", targets: ["AnimalKingdomAPI"]),
],
dependencies: [
.package( name: "apollo-ios",
url: "https://github.com/apollographql/apollo-ios.git",
.branch("release/1.0")),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.2"),
],
targets: [
.target(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct SwiftPackageManagerModuleTemplate: TemplateRenderer {
.library(name: "\(casedModuleName)", targets: ["\(casedModuleName)"]),
],
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.1"),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.2"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion Sources/GitHubAPI/GitHubAPI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
.library(name: "GitHubAPI", targets: ["GitHubAPI"]),
],
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.1"),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.2"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion Sources/StarWarsAPI/StarWarsAPI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
.library(name: "StarWarsAPI", targets: ["StarWarsAPI"]),
],
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.1"),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.2"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion Sources/SubscriptionAPI/SubscriptionAPI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
.library(name: "SubscriptionAPI", targets: ["SubscriptionAPI"]),
],
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.1"),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.2"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion Sources/UploadAPI/UploadAPI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
.library(name: "UploadAPI", targets: ["UploadAPI"]),
],
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.1"),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.2"),
],
targets: [
.target(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class SwiftPackageManagerModuleTemplateTests: XCTestCase {

let expected = """
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.1"),
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0-beta.2"),
],
"""
// when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@
"doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/Glob",
"doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/GraphQLSourceLocation",
"doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/IsEverTrue",
"doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/LinkedList"
"doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/LinkedList",
"doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ValidationOptions"
],
"title" : "Structures"
},
Expand Down Expand Up @@ -1578,6 +1579,37 @@
"type" : "topic",
"url" : "\/documentation\/apollocodegenlib\/linkedlist"
},
"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ValidationOptions": {
"abstract" : [

],
"fragments" : [
{
"kind" : "keyword",
"text" : "struct"
},
{
"kind" : "text",
"text" : " "
},
{
"kind" : "identifier",
"text" : "ValidationOptions"
}
],
"identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ValidationOptions",
"kind" : "symbol",
"navigatorTitle" : [
{
"kind" : "identifier",
"text" : "ValidationOptions"
}
],
"role" : "symbol",
"title" : "ValidationOptions",
"type" : "topic",
"url" : "\/documentation\/apollocodegenlib\/validationoptions"
},
"https://graphql.org/graphql-js/error/#graphqlerror": {
"identifier" : "https:\/\/graphql.org\/graphql-js\/error\/#graphqlerror",
"title" : "graphql-js\/GraphQLError",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"topicSections" : [
{
"identifiers" : [
"doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(additionalInflectionRules:queryStringLiteralFormat:deprecatedEnumCases:schemaDocumentation:apqs:warningsOnDeprecatedUsage:)",
"doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(additionalInflectionRules:queryStringLiteralFormat:deprecatedEnumCases:schemaDocumentation:apqs:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:)",
"doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(from:)"
],
"title" : "Initializers"
Expand All @@ -111,6 +111,7 @@
"identifiers" : [
"doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/additionalInflectionRules",
"doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/apqs",
"doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/cocoapodsCompatibleImportStatements",
"doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/deprecatedEnumCases",
"doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/queryStringLiteralFormat",
"doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/schemaDocumentation",
Expand Down Expand Up @@ -332,6 +333,51 @@
"type" : "topic",
"url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/apqs"
},
"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/cocoapodsCompatibleImportStatements": {
"abstract" : [
{
"text" : "Generate import statements that are compatible with including ",
"type" : "text"
},
{
"code" : "Apollo",
"type" : "codeVoice"
},
{
"text" : " via Cocoapods.",
"type" : "text"
}
],
"fragments" : [
{
"kind" : "keyword",
"text" : "let"
},
{
"kind" : "text",
"text" : " "
},
{
"kind" : "identifier",
"text" : "cocoapodsCompatibleImportStatements"
},
{
"kind" : "text",
"text" : ": "
},
{
"kind" : "typeIdentifier",
"preciseIdentifier" : "s:Sb",
"text" : "Bool"
}
],
"identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/cocoapodsCompatibleImportStatements",
"kind" : "symbol",
"role" : "symbol",
"title" : "cocoapodsCompatibleImportStatements",
"type" : "topic",
"url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/cocoapodscompatibleimportstatements"
},
"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/deprecatedEnumCases": {
"abstract" : [
{
Expand Down Expand Up @@ -378,7 +424,7 @@
"type" : "topic",
"url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/deprecatedenumcases"
},
"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/init(additionalInflectionRules:queryStringLiteralFormat:deprecatedEnumCases:schemaDocumentation:apqs:warningsOnDeprecatedUsage:)": {
"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/init(additionalInflectionRules:queryStringLiteralFormat:deprecatedEnumCases:schemaDocumentation:apqs:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:)": {
"abstract" : [
{
"text" : "Designated initializer.",
Expand Down Expand Up @@ -515,6 +561,23 @@
"kind" : "text",
"text" : ", "
},
{
"kind" : "externalParam",
"text" : "cocoapodsCompatibleImportStatements"
},
{
"kind" : "text",
"text" : ": "
},
{
"kind" : "typeIdentifier",
"preciseIdentifier" : "s:Sb",
"text" : "Bool"
},
{
"kind" : "text",
"text" : ", "
},
{
"kind" : "externalParam",
"text" : "warningsOnDeprecatedUsage"
Expand Down Expand Up @@ -542,12 +605,12 @@
"text" : ")"
}
],
"identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(additionalInflectionRules:queryStringLiteralFormat:deprecatedEnumCases:schemaDocumentation:apqs:warningsOnDeprecatedUsage:)",
"identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(additionalInflectionRules:queryStringLiteralFormat:deprecatedEnumCases:schemaDocumentation:apqs:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:)",
"kind" : "symbol",
"role" : "symbol",
"title" : "init(additionalInflectionRules:queryStringLiteralFormat:deprecatedEnumCases:schemaDocumentation:apqs:warningsOnDeprecatedUsage:)",
"title" : "init(additionalInflectionRules:queryStringLiteralFormat:deprecatedEnumCases:schemaDocumentation:apqs:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:)",
"type" : "topic",
"url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/init(additionalinflectionrules:querystringliteralformat:deprecatedenumcases:schemadocumentation:apqs:warningsondeprecatedusage:)"
"url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/init(additionalinflectionrules:querystringliteralformat:deprecatedenumcases:schemadocumentation:apqs:cocoapodscompatibleimportstatements:warningsondeprecatedusage:)"
},
"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/init(from:)": {
"abstract" : [
Expand Down
Loading

0 comments on commit 28c6023

Please sign in to comment.