From 5c5e17e979f007f3bf2ecdea69b6fdb22238000d Mon Sep 17 00:00:00 2001 From: Calvin Cestari Date: Tue, 25 Oct 2022 12:11:19 -0700 Subject: [PATCH 01/11] Use fully qualified dynamicMember subscript operator syntax --- Sources/ApolloCodegenLib/Templates/InputObjectTemplate.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/ApolloCodegenLib/Templates/InputObjectTemplate.swift b/Sources/ApolloCodegenLib/Templates/InputObjectTemplate.swift index 0af4747269..7a33886651 100644 --- a/Sources/ApolloCodegenLib/Templates/InputObjectTemplate.swift +++ b/Sources/ApolloCodegenLib/Templates/InputObjectTemplate.swift @@ -111,8 +111,8 @@ struct InputObjectTemplate: TemplateRenderer { \(documentation: field.documentation, config: config) \(deprecationReason: field.deprecationReason, config: config) public var \(field.name.asInputParameterName): \(field.renderInputValueType(config: config.config)) { - get { __data.\(field.name.asInputParameterName) } - set { __data.\(field.name.asInputParameterName) = newValue } + get { __data[dynamicMember: "\(field.name.asInputParameterName)"] } + set { __data[dynamicMember: "\(field.name.asInputParameterName)"] = newValue } } """ } From 895a728157f3b47ccc17157101215d2ee98b0504 Mon Sep 17 00:00:00 2001 From: Calvin Cestari Date: Tue, 25 Oct 2022 12:11:38 -0700 Subject: [PATCH 02/11] Update InputObject tests --- .../Templates/InputObjectTemplateTests.swift | 318 +++++++++--------- 1 file changed, 159 insertions(+), 159 deletions(-) diff --git a/Tests/ApolloCodegenTests/CodeGeneration/Templates/InputObjectTemplateTests.swift b/Tests/ApolloCodegenTests/CodeGeneration/Templates/InputObjectTemplateTests.swift index 7acbe045b1..cd2d7d4e69 100644 --- a/Tests/ApolloCodegenTests/CodeGeneration/Templates/InputObjectTemplateTests.swift +++ b/Tests/ApolloCodegenTests/CodeGeneration/Templates/InputObjectTemplateTests.swift @@ -171,8 +171,8 @@ class InputObjectTemplateTests: XCTestCase { } public var field: GraphQLNullable { - get { __data.field } - set { __data.field = newValue } + get { __data[dynamicMember: "field"] } + set { __data[dynamicMember: "field"] = newValue } } } @@ -285,58 +285,58 @@ class InputObjectTemplateTests: XCTestCase { } public var stringField: GraphQLNullable { - get { __data.stringField } - set { __data.stringField = newValue } + get { __data[dynamicMember: "stringField"] } + set { __data[dynamicMember: "stringField"] = newValue } } public var intField: GraphQLNullable { - get { __data.intField } - set { __data.intField = newValue } + get { __data[dynamicMember: "intField"] } + set { __data[dynamicMember: "intField"] = newValue } } public var boolField: GraphQLNullable { - get { __data.boolField } - set { __data.boolField = newValue } + get { __data[dynamicMember: "boolField"] } + set { __data[dynamicMember: "boolField"] = newValue } } public var floatField: GraphQLNullable { - get { __data.floatField } - set { __data.floatField = newValue } + get { __data[dynamicMember: "floatField"] } + set { __data[dynamicMember: "floatField"] = newValue } } public var customScalarField: GraphQLNullable { - get { __data.customScalarField } - set { __data.customScalarField = newValue } + get { __data[dynamicMember: "customScalarField"] } + set { __data[dynamicMember: "customScalarField"] = newValue } } public var lowercaseCustomScalarField: GraphQLNullable { - get { __data.lowercaseCustomScalarField } - set { __data.lowercaseCustomScalarField = newValue } + get { __data[dynamicMember: "lowercaseCustomScalarField"] } + set { __data[dynamicMember: "lowercaseCustomScalarField"] = newValue } } public var enumField: GraphQLNullable> { - get { __data.enumField } - set { __data.enumField = newValue } + get { __data[dynamicMember: "enumField"] } + set { __data[dynamicMember: "enumField"] = newValue } } public var lowercaseEnumField: GraphQLNullable> { - get { __data.lowercaseEnumField } - set { __data.lowercaseEnumField = newValue } + get { __data[dynamicMember: "lowercaseEnumField"] } + set { __data[dynamicMember: "lowercaseEnumField"] = newValue } } public var inputField: GraphQLNullable { - get { __data.inputField } - set { __data.inputField = newValue } + get { __data[dynamicMember: "inputField"] } + set { __data[dynamicMember: "inputField"] = newValue } } public var lowercaseInputField: GraphQLNullable { - get { __data.lowercaseInputField } - set { __data.lowercaseInputField = newValue } + get { __data[dynamicMember: "lowercaseInputField"] } + set { __data[dynamicMember: "lowercaseInputField"] = newValue } } public var listField: GraphQLNullable<[String?]> { - get { __data.listField } - set { __data.listField = newValue } + get { __data[dynamicMember: "listField"] } + set { __data[dynamicMember: "listField"] = newValue } } """ @@ -379,13 +379,13 @@ class InputObjectTemplateTests: XCTestCase { } public var enumField: GraphQLNullable> { - get { __data.enumField } - set { __data.enumField = newValue } + get { __data[dynamicMember: "enumField"] } + set { __data[dynamicMember: "enumField"] = newValue } } public var inputField: GraphQLNullable { - get { __data.inputField } - set { __data.inputField = newValue } + get { __data[dynamicMember: "inputField"] } + set { __data[dynamicMember: "inputField"] = newValue } } """ @@ -401,13 +401,13 @@ class InputObjectTemplateTests: XCTestCase { } public var enumField: GraphQLNullable> { - get { __data.enumField } - set { __data.enumField = newValue } + get { __data[dynamicMember: "enumField"] } + set { __data[dynamicMember: "enumField"] = newValue } } public var inputField: GraphQLNullable { - get { __data.inputField } - set { __data.inputField = newValue } + get { __data[dynamicMember: "inputField"] } + set { __data[dynamicMember: "inputField"] = newValue } } """ @@ -1142,24 +1142,24 @@ class InputObjectTemplateTests: XCTestCase { @available(*, deprecated, message: "Not used anymore!") public var fieldOne: String { - get { __data.fieldOne } - set { __data.fieldOne = newValue } + get { __data[dynamicMember: "fieldOne"] } + set { __data[dynamicMember: "fieldOne"] = newValue } } public var fieldTwo: String { - get { __data.fieldTwo } - set { __data.fieldTwo = newValue } + get { __data[dynamicMember: "fieldTwo"] } + set { __data[dynamicMember: "fieldTwo"] = newValue } } public var fieldThree: String { - get { __data.fieldThree } - set { __data.fieldThree = newValue } + get { __data[dynamicMember: "fieldThree"] } + set { __data[dynamicMember: "fieldThree"] = newValue } } @available(*, deprecated, message: "Stop using this field!") public var fieldFour: String { - get { __data.fieldFour } - set { __data.fieldFour = newValue } + get { __data[dynamicMember: "fieldFour"] } + set { __data[dynamicMember: "fieldFour"] = newValue } } """ @@ -1219,18 +1219,18 @@ class InputObjectTemplateTests: XCTestCase { } public var fieldOne: String { - get { __data.fieldOne } - set { __data.fieldOne = newValue } + get { __data[dynamicMember: "fieldOne"] } + set { __data[dynamicMember: "fieldOne"] = newValue } } public var fieldTwo: String { - get { __data.fieldTwo } - set { __data.fieldTwo = newValue } + get { __data[dynamicMember: "fieldTwo"] } + set { __data[dynamicMember: "fieldTwo"] = newValue } } public var fieldThree: String { - get { __data.fieldThree } - set { __data.fieldThree = newValue } + get { __data[dynamicMember: "fieldThree"] } + set { __data[dynamicMember: "fieldThree"] = newValue } } """ @@ -1608,253 +1608,253 @@ class InputObjectTemplateTests: XCTestCase { } public var `associatedtype`: String { - get { __data.`associatedtype` } - set { __data.`associatedtype` = newValue } + get { __data[dynamicMember: "`associatedtype`"] } + set { __data[dynamicMember: "`associatedtype`"] = newValue } } public var `class`: String { - get { __data.`class` } - set { __data.`class` = newValue } + get { __data[dynamicMember: "`class`"] } + set { __data[dynamicMember: "`class`"] = newValue } } public var `deinit`: String { - get { __data.`deinit` } - set { __data.`deinit` = newValue } + get { __data[dynamicMember: "`deinit`"] } + set { __data[dynamicMember: "`deinit`"] = newValue } } public var `enum`: String { - get { __data.`enum` } - set { __data.`enum` = newValue } + get { __data[dynamicMember: "`enum`"] } + set { __data[dynamicMember: "`enum`"] = newValue } } public var `extension`: String { - get { __data.`extension` } - set { __data.`extension` = newValue } + get { __data[dynamicMember: "`extension`"] } + set { __data[dynamicMember: "`extension`"] = newValue } } public var `fileprivate`: String { - get { __data.`fileprivate` } - set { __data.`fileprivate` = newValue } + get { __data[dynamicMember: "`fileprivate`"] } + set { __data[dynamicMember: "`fileprivate`"] = newValue } } public var `func`: String { - get { __data.`func` } - set { __data.`func` = newValue } + get { __data[dynamicMember: "`func`"] } + set { __data[dynamicMember: "`func`"] = newValue } } public var `import`: String { - get { __data.`import` } - set { __data.`import` = newValue } + get { __data[dynamicMember: "`import`"] } + set { __data[dynamicMember: "`import`"] = newValue } } public var `init`: String { - get { __data.`init` } - set { __data.`init` = newValue } + get { __data[dynamicMember: "`init`"] } + set { __data[dynamicMember: "`init`"] = newValue } } public var `inout`: String { - get { __data.`inout` } - set { __data.`inout` = newValue } + get { __data[dynamicMember: "`inout`"] } + set { __data[dynamicMember: "`inout`"] = newValue } } public var `internal`: String { - get { __data.`internal` } - set { __data.`internal` = newValue } + get { __data[dynamicMember: "`internal`"] } + set { __data[dynamicMember: "`internal`"] = newValue } } public var `let`: String { - get { __data.`let` } - set { __data.`let` = newValue } + get { __data[dynamicMember: "`let`"] } + set { __data[dynamicMember: "`let`"] = newValue } } public var `operator`: String { - get { __data.`operator` } - set { __data.`operator` = newValue } + get { __data[dynamicMember: "`operator`"] } + set { __data[dynamicMember: "`operator`"] = newValue } } public var `private`: String { - get { __data.`private` } - set { __data.`private` = newValue } + get { __data[dynamicMember: "`private`"] } + set { __data[dynamicMember: "`private`"] = newValue } } public var `precedencegroup`: String { - get { __data.`precedencegroup` } - set { __data.`precedencegroup` = newValue } + get { __data[dynamicMember: "`precedencegroup`"] } + set { __data[dynamicMember: "`precedencegroup`"] = newValue } } public var `protocol`: String { - get { __data.`protocol` } - set { __data.`protocol` = newValue } + get { __data[dynamicMember: "`protocol`"] } + set { __data[dynamicMember: "`protocol`"] = newValue } } public var `public`: String { - get { __data.`public` } - set { __data.`public` = newValue } + get { __data[dynamicMember: "`public`"] } + set { __data[dynamicMember: "`public`"] = newValue } } public var `rethrows`: String { - get { __data.`rethrows` } - set { __data.`rethrows` = newValue } + get { __data[dynamicMember: "`rethrows`"] } + set { __data[dynamicMember: "`rethrows`"] = newValue } } public var `static`: String { - get { __data.`static` } - set { __data.`static` = newValue } + get { __data[dynamicMember: "`static`"] } + set { __data[dynamicMember: "`static`"] = newValue } } public var `struct`: String { - get { __data.`struct` } - set { __data.`struct` = newValue } + get { __data[dynamicMember: "`struct`"] } + set { __data[dynamicMember: "`struct`"] = newValue } } public var `subscript`: String { - get { __data.`subscript` } - set { __data.`subscript` = newValue } + get { __data[dynamicMember: "`subscript`"] } + set { __data[dynamicMember: "`subscript`"] = newValue } } public var `typealias`: String { - get { __data.`typealias` } - set { __data.`typealias` = newValue } + get { __data[dynamicMember: "`typealias`"] } + set { __data[dynamicMember: "`typealias`"] = newValue } } public var `var`: String { - get { __data.`var` } - set { __data.`var` = newValue } + get { __data[dynamicMember: "`var`"] } + set { __data[dynamicMember: "`var`"] = newValue } } public var `break`: String { - get { __data.`break` } - set { __data.`break` = newValue } + get { __data[dynamicMember: "`break`"] } + set { __data[dynamicMember: "`break`"] = newValue } } public var `case`: String { - get { __data.`case` } - set { __data.`case` = newValue } + get { __data[dynamicMember: "`case`"] } + set { __data[dynamicMember: "`case`"] = newValue } } public var `catch`: String { - get { __data.`catch` } - set { __data.`catch` = newValue } + get { __data[dynamicMember: "`catch`"] } + set { __data[dynamicMember: "`catch`"] = newValue } } public var `continue`: String { - get { __data.`continue` } - set { __data.`continue` = newValue } + get { __data[dynamicMember: "`continue`"] } + set { __data[dynamicMember: "`continue`"] = newValue } } public var `default`: String { - get { __data.`default` } - set { __data.`default` = newValue } + get { __data[dynamicMember: "`default`"] } + set { __data[dynamicMember: "`default`"] = newValue } } public var `defer`: String { - get { __data.`defer` } - set { __data.`defer` = newValue } + get { __data[dynamicMember: "`defer`"] } + set { __data[dynamicMember: "`defer`"] = newValue } } public var `do`: String { - get { __data.`do` } - set { __data.`do` = newValue } + get { __data[dynamicMember: "`do`"] } + set { __data[dynamicMember: "`do`"] = newValue } } public var `else`: String { - get { __data.`else` } - set { __data.`else` = newValue } + get { __data[dynamicMember: "`else`"] } + set { __data[dynamicMember: "`else`"] = newValue } } public var `fallthrough`: String { - get { __data.`fallthrough` } - set { __data.`fallthrough` = newValue } + get { __data[dynamicMember: "`fallthrough`"] } + set { __data[dynamicMember: "`fallthrough`"] = newValue } } public var `guard`: String { - get { __data.`guard` } - set { __data.`guard` = newValue } + get { __data[dynamicMember: "`guard`"] } + set { __data[dynamicMember: "`guard`"] = newValue } } public var `if`: String { - get { __data.`if` } - set { __data.`if` = newValue } + get { __data[dynamicMember: "`if`"] } + set { __data[dynamicMember: "`if`"] = newValue } } public var `in`: String { - get { __data.`in` } - set { __data.`in` = newValue } + get { __data[dynamicMember: "`in`"] } + set { __data[dynamicMember: "`in`"] = newValue } } public var `repeat`: String { - get { __data.`repeat` } - set { __data.`repeat` = newValue } + get { __data[dynamicMember: "`repeat`"] } + set { __data[dynamicMember: "`repeat`"] = newValue } } public var `return`: String { - get { __data.`return` } - set { __data.`return` = newValue } + get { __data[dynamicMember: "`return`"] } + set { __data[dynamicMember: "`return`"] = newValue } } public var `throw`: String { - get { __data.`throw` } - set { __data.`throw` = newValue } + get { __data[dynamicMember: "`throw`"] } + set { __data[dynamicMember: "`throw`"] = newValue } } public var `switch`: String { - get { __data.`switch` } - set { __data.`switch` = newValue } + get { __data[dynamicMember: "`switch`"] } + set { __data[dynamicMember: "`switch`"] = newValue } } public var `where`: String { - get { __data.`where` } - set { __data.`where` = newValue } + get { __data[dynamicMember: "`where`"] } + set { __data[dynamicMember: "`where`"] = newValue } } public var `while`: String { - get { __data.`while` } - set { __data.`while` = newValue } + get { __data[dynamicMember: "`while`"] } + set { __data[dynamicMember: "`while`"] = newValue } } public var `as`: String { - get { __data.`as` } - set { __data.`as` = newValue } + get { __data[dynamicMember: "`as`"] } + set { __data[dynamicMember: "`as`"] = newValue } } public var `false`: String { - get { __data.`false` } - set { __data.`false` = newValue } + get { __data[dynamicMember: "`false`"] } + set { __data[dynamicMember: "`false`"] = newValue } } public var `is`: String { - get { __data.`is` } - set { __data.`is` = newValue } + get { __data[dynamicMember: "`is`"] } + set { __data[dynamicMember: "`is`"] = newValue } } public var `nil`: String { - get { __data.`nil` } - set { __data.`nil` = newValue } + get { __data[dynamicMember: "`nil`"] } + set { __data[dynamicMember: "`nil`"] = newValue } } public var `self`: String { - get { __data.`self` } - set { __data.`self` = newValue } + get { __data[dynamicMember: "`self`"] } + set { __data[dynamicMember: "`self`"] = newValue } } public var `super`: String { - get { __data.`super` } - set { __data.`super` = newValue } + get { __data[dynamicMember: "`super`"] } + set { __data[dynamicMember: "`super`"] = newValue } } public var `throws`: String { - get { __data.`throws` } - set { __data.`throws` = newValue } + get { __data[dynamicMember: "`throws`"] } + set { __data[dynamicMember: "`throws`"] = newValue } } public var `true`: String { - get { __data.`true` } - set { __data.`true` = newValue } + get { __data[dynamicMember: "`true`"] } + set { __data[dynamicMember: "`true`"] = newValue } } public var `try`: String { - get { __data.`try` } - set { __data.`try` = newValue } + get { __data[dynamicMember: "`try`"] } + set { __data[dynamicMember: "`try`"] = newValue } } """ @@ -1906,13 +1906,13 @@ class InputObjectTemplateTests: XCTestCase { } public var enumField: GraphQLNullable> { - get { __data.enumField } - set { __data.enumField = newValue } + get { __data[dynamicMember: "enumField"] } + set { __data[dynamicMember: "enumField"] = newValue } } public var inputField: GraphQLNullable { - get { __data.inputField } - set { __data.inputField = newValue } + get { __data[dynamicMember: "inputField"] } + set { __data[dynamicMember: "inputField"] = newValue } } """ @@ -1962,13 +1962,13 @@ class InputObjectTemplateTests: XCTestCase { } public var enumField: GraphQLNullable> { - get { __data.enumField } - set { __data.enumField = newValue } + get { __data[dynamicMember: "enumField"] } + set { __data[dynamicMember: "enumField"] = newValue } } public var inputField: GraphQLNullable { - get { __data.inputField } - set { __data.inputField = newValue } + get { __data[dynamicMember: "inputField"] } + set { __data[dynamicMember: "inputField"] = newValue } } """ @@ -2018,13 +2018,13 @@ class InputObjectTemplateTests: XCTestCase { } public var enumField: GraphQLNullable> { - get { __data.enumField } - set { __data.enumField = newValue } + get { __data[dynamicMember: "enumField"] } + set { __data[dynamicMember: "enumField"] = newValue } } public var inputField: GraphQLNullable { - get { __data.inputField } - set { __data.inputField = newValue } + get { __data[dynamicMember: "inputField"] } + set { __data[dynamicMember: "inputField"] = newValue } } """ @@ -2035,7 +2035,7 @@ class InputObjectTemplateTests: XCTestCase { expect(actual).to(equalLineByLine(expected, atLine: 8, ignoringExtraLines: true)) } - func test__casing__givenLowercasedSchemaName_listField_generatesWithFirstUppercasedNamespace() throws { + func test__casing__givenLowercasedSchemaName_listField_generatesWithFirstUppercasedzNamespace() throws { // given buildSubject( fields: [GraphQLInputField.mock( From 8b3de9fceed172b4376dee349136001735a5b452 Mon Sep 17 00:00:00 2001 From: Calvin Cestari Date: Tue, 25 Oct 2022 12:14:04 -0700 Subject: [PATCH 03/11] Update internal projects --- .../MeasurementsInput.graphql.swift | 12 +++++----- .../PetAdoptionInput.graphql.swift | 24 +++++++++---------- .../PetSearchFilters.graphql.swift | 12 +++++----- .../InputObjects/ColorInput.graphql.swift | 12 +++++----- .../InputObjects/ReviewInput.graphql.swift | 12 +++++----- .../MeasurementsInput.graphql.swift | 12 +++++----- .../PetAdoptionInput.graphql.swift | 24 +++++++++---------- .../PetSearchFilters.graphql.swift | 12 +++++----- .../MeasurementsInput.graphql.swift | 12 +++++----- .../PetAdoptionInput.graphql.swift | 24 +++++++++---------- .../PetSearchFilters.graphql.swift | 12 +++++----- .../MeasurementsInput.graphql.swift | 12 +++++----- .../PetAdoptionInput.graphql.swift | 24 +++++++++---------- .../PetSearchFilters.graphql.swift | 12 +++++----- .../MeasurementsInput.graphql.swift | 12 +++++----- .../PetAdoptionInput.graphql.swift | 24 +++++++++---------- .../PetSearchFilters.graphql.swift | 12 +++++----- .../MeasurementsInput.graphql.swift | 12 +++++----- .../PetAdoptionInput.graphql.swift | 24 +++++++++---------- .../PetSearchFilters.graphql.swift | 12 +++++----- .../MeasurementsInput.graphql.swift | 12 +++++----- .../PetAdoptionInput.graphql.swift | 24 +++++++++---------- .../PetSearchFilters.graphql.swift | 12 +++++----- 23 files changed, 180 insertions(+), 180 deletions(-) diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift index 0d00b75f3d..b673339f9f 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift @@ -34,18 +34,18 @@ public struct MeasurementsInput: InputObject { } public var height: Double { - get { __data.height } - set { __data.height = newValue } + get { __data[dynamicMember: "height"] } + set { __data[dynamicMember: "height"] = newValue } } public var weight: Double { - get { __data.weight } - set { __data.weight = newValue } + get { __data[dynamicMember: "weight"] } + set { __data[dynamicMember: "weight"] = newValue } } @available(*, deprecated, message: "No longer valid.") public var wingspan: GraphQLNullable { - get { __data.wingspan } - set { __data.wingspan = newValue } + get { __data[dynamicMember: "wingspan"] } + set { __data[dynamicMember: "wingspan"] = newValue } } } diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift index 292474147e..d1570ac609 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift @@ -29,33 +29,33 @@ public struct PetAdoptionInput: InputObject { } public var ownerID: ID { - get { __data.ownerID } - set { __data.ownerID = newValue } + get { __data[dynamicMember: "ownerID"] } + set { __data[dynamicMember: "ownerID"] = newValue } } public var petID: ID { - get { __data.petID } - set { __data.petID = newValue } + get { __data[dynamicMember: "petID"] } + set { __data[dynamicMember: "petID"] = newValue } } /// The given name the pet is called by its human. public var humanName: GraphQLNullable { - get { __data.humanName } - set { __data.humanName = newValue } + get { __data[dynamicMember: "humanName"] } + set { __data[dynamicMember: "humanName"] = newValue } } public var favoriteToy: String { - get { __data.favoriteToy } - set { __data.favoriteToy = newValue } + get { __data[dynamicMember: "favoriteToy"] } + set { __data[dynamicMember: "favoriteToy"] = newValue } } public var isSpayedOrNeutered: Bool? { - get { __data.isSpayedOrNeutered } - set { __data.isSpayedOrNeutered = newValue } + get { __data[dynamicMember: "isSpayedOrNeutered"] } + set { __data[dynamicMember: "isSpayedOrNeutered"] = newValue } } public var measurements: GraphQLNullable { - get { __data.measurements } - set { __data.measurements = newValue } + get { __data[dynamicMember: "measurements"] } + set { __data[dynamicMember: "measurements"] = newValue } } } diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift index 972ef94c8c..f2d7dad9d6 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -23,17 +23,17 @@ public struct PetSearchFilters: InputObject { } public var species: [String] { - get { __data.species } - set { __data.species = newValue } + get { __data[dynamicMember: "species"] } + set { __data[dynamicMember: "species"] = newValue } } public var size: GraphQLNullable> { - get { __data.size } - set { __data.size = newValue } + get { __data[dynamicMember: "size"] } + set { __data[dynamicMember: "size"] = newValue } } public var measurements: GraphQLNullable { - get { __data.measurements } - set { __data.measurements = newValue } + get { __data[dynamicMember: "measurements"] } + set { __data[dynamicMember: "measurements"] = newValue } } } diff --git a/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ColorInput.graphql.swift b/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ColorInput.graphql.swift index 6d14df68f7..72dbc7ada7 100644 --- a/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ColorInput.graphql.swift +++ b/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ColorInput.graphql.swift @@ -24,17 +24,17 @@ public struct ColorInput: InputObject { } public var red: Int { - get { __data.red } - set { __data.red = newValue } + get { __data[dynamicMember: "red"] } + set { __data[dynamicMember: "red"] = newValue } } public var green: Int { - get { __data.green } - set { __data.green = newValue } + get { __data[dynamicMember: "green"] } + set { __data[dynamicMember: "green"] = newValue } } public var blue: Int { - get { __data.blue } - set { __data.blue = newValue } + get { __data[dynamicMember: "blue"] } + set { __data[dynamicMember: "blue"] = newValue } } } diff --git a/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ReviewInput.graphql.swift b/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ReviewInput.graphql.swift index 878ffa18fc..570e6fb261 100644 --- a/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ReviewInput.graphql.swift +++ b/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ReviewInput.graphql.swift @@ -25,19 +25,19 @@ public struct ReviewInput: InputObject { /// 0-5 stars public var stars: Int { - get { __data.stars } - set { __data.stars = newValue } + get { __data[dynamicMember: "stars"] } + set { __data[dynamicMember: "stars"] = newValue } } /// Comment about the movie, optional public var commentary: GraphQLNullable { - get { __data.commentary } - set { __data.commentary = newValue } + get { __data[dynamicMember: "commentary"] } + set { __data[dynamicMember: "commentary"] = newValue } } /// Favorite color, optional public var favorite_color: GraphQLNullable { - get { __data.favorite_color } - set { __data.favorite_color = newValue } + get { __data[dynamicMember: "favorite_color"] } + set { __data[dynamicMember: "favorite_color"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/MeasurementsInput.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/MeasurementsInput.graphql.swift index b113d49c29..381bf9c46a 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/MeasurementsInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/MeasurementsInput.graphql.swift @@ -35,19 +35,19 @@ public extension MyGraphQLSchema { } public var height: Double { - get { __data.height } - set { __data.height = newValue } + get { __data[dynamicMember: "height"] } + set { __data[dynamicMember: "height"] = newValue } } public var weight: Double { - get { __data.weight } - set { __data.weight = newValue } + get { __data[dynamicMember: "weight"] } + set { __data[dynamicMember: "weight"] = newValue } } @available(*, deprecated, message: "No longer valid.") public var wingspan: GraphQLNullable { - get { __data.wingspan } - set { __data.wingspan = newValue } + get { __data[dynamicMember: "wingspan"] } + set { __data[dynamicMember: "wingspan"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetAdoptionInput.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetAdoptionInput.graphql.swift index 04aa070179..c22aec5303 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetAdoptionInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetAdoptionInput.graphql.swift @@ -30,34 +30,34 @@ public extension MyGraphQLSchema { } public var ownerID: ID { - get { __data.ownerID } - set { __data.ownerID = newValue } + get { __data[dynamicMember: "ownerID"] } + set { __data[dynamicMember: "ownerID"] = newValue } } public var petID: ID { - get { __data.petID } - set { __data.petID = newValue } + get { __data[dynamicMember: "petID"] } + set { __data[dynamicMember: "petID"] = newValue } } /// The given name the pet is called by its human. public var humanName: GraphQLNullable { - get { __data.humanName } - set { __data.humanName = newValue } + get { __data[dynamicMember: "humanName"] } + set { __data[dynamicMember: "humanName"] = newValue } } public var favoriteToy: String { - get { __data.favoriteToy } - set { __data.favoriteToy = newValue } + get { __data[dynamicMember: "favoriteToy"] } + set { __data[dynamicMember: "favoriteToy"] = newValue } } public var isSpayedOrNeutered: Bool? { - get { __data.isSpayedOrNeutered } - set { __data.isSpayedOrNeutered = newValue } + get { __data[dynamicMember: "isSpayedOrNeutered"] } + set { __data[dynamicMember: "isSpayedOrNeutered"] = newValue } } public var measurements: GraphQLNullable { - get { __data.measurements } - set { __data.measurements = newValue } + get { __data[dynamicMember: "measurements"] } + set { __data[dynamicMember: "measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetSearchFilters.graphql.swift index 454198474f..4d1f7bb2ae 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -24,18 +24,18 @@ public extension MyGraphQLSchema { } public var species: [String] { - get { __data.species } - set { __data.species = newValue } + get { __data[dynamicMember: "species"] } + set { __data[dynamicMember: "species"] = newValue } } public var size: GraphQLNullable> { - get { __data.size } - set { __data.size = newValue } + get { __data[dynamicMember: "size"] } + set { __data[dynamicMember: "size"] = newValue } } public var measurements: GraphQLNullable { - get { __data.measurements } - set { __data.measurements = newValue } + get { __data[dynamicMember: "measurements"] } + set { __data[dynamicMember: "measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/MeasurementsInput.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/MeasurementsInput.graphql.swift index 2ee9ccb1dc..a7f85b0352 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/MeasurementsInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/MeasurementsInput.graphql.swift @@ -35,19 +35,19 @@ public extension MySchemaModule { } public var height: Double { - get { __data.height } - set { __data.height = newValue } + get { __data[dynamicMember: "height"] } + set { __data[dynamicMember: "height"] = newValue } } public var weight: Double { - get { __data.weight } - set { __data.weight = newValue } + get { __data[dynamicMember: "weight"] } + set { __data[dynamicMember: "weight"] = newValue } } @available(*, deprecated, message: "No longer valid.") public var wingspan: GraphQLNullable { - get { __data.wingspan } - set { __data.wingspan = newValue } + get { __data[dynamicMember: "wingspan"] } + set { __data[dynamicMember: "wingspan"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetAdoptionInput.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetAdoptionInput.graphql.swift index 9aa2d85f27..ff08007381 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetAdoptionInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetAdoptionInput.graphql.swift @@ -30,34 +30,34 @@ public extension MySchemaModule { } public var ownerID: MySchemaModule.ID { - get { __data.ownerID } - set { __data.ownerID = newValue } + get { __data[dynamicMember: "ownerID"] } + set { __data[dynamicMember: "ownerID"] = newValue } } public var petID: MySchemaModule.ID { - get { __data.petID } - set { __data.petID = newValue } + get { __data[dynamicMember: "petID"] } + set { __data[dynamicMember: "petID"] = newValue } } /// The given name the pet is called by its human. public var humanName: GraphQLNullable { - get { __data.humanName } - set { __data.humanName = newValue } + get { __data[dynamicMember: "humanName"] } + set { __data[dynamicMember: "humanName"] = newValue } } public var favoriteToy: String { - get { __data.favoriteToy } - set { __data.favoriteToy = newValue } + get { __data[dynamicMember: "favoriteToy"] } + set { __data[dynamicMember: "favoriteToy"] = newValue } } public var isSpayedOrNeutered: Bool? { - get { __data.isSpayedOrNeutered } - set { __data.isSpayedOrNeutered = newValue } + get { __data[dynamicMember: "isSpayedOrNeutered"] } + set { __data[dynamicMember: "isSpayedOrNeutered"] = newValue } } public var measurements: GraphQLNullable { - get { __data.measurements } - set { __data.measurements = newValue } + get { __data[dynamicMember: "measurements"] } + set { __data[dynamicMember: "measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetSearchFilters.graphql.swift index 0f70a39dbf..724bfd9039 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetSearchFilters.graphql.swift @@ -24,18 +24,18 @@ public extension MySchemaModule { } public var species: [String] { - get { __data.species } - set { __data.species = newValue } + get { __data[dynamicMember: "species"] } + set { __data[dynamicMember: "species"] = newValue } } public var size: GraphQLNullable> { - get { __data.size } - set { __data.size = newValue } + get { __data[dynamicMember: "size"] } + set { __data[dynamicMember: "size"] = newValue } } public var measurements: GraphQLNullable { - get { __data.measurements } - set { __data.measurements = newValue } + get { __data[dynamicMember: "measurements"] } + set { __data[dynamicMember: "measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/MeasurementsInput.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/MeasurementsInput.graphql.swift index c231dc620a..206bede742 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/MeasurementsInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/MeasurementsInput.graphql.swift @@ -34,18 +34,18 @@ public struct MeasurementsInput: InputObject { } public var height: Double { - get { __data.height } - set { __data.height = newValue } + get { __data[dynamicMember: "height"] } + set { __data[dynamicMember: "height"] = newValue } } public var weight: Double { - get { __data.weight } - set { __data.weight = newValue } + get { __data[dynamicMember: "weight"] } + set { __data[dynamicMember: "weight"] = newValue } } @available(*, deprecated, message: "No longer valid.") public var wingspan: GraphQLNullable { - get { __data.wingspan } - set { __data.wingspan = newValue } + get { __data[dynamicMember: "wingspan"] } + set { __data[dynamicMember: "wingspan"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetAdoptionInput.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetAdoptionInput.graphql.swift index cfccbd9c5b..51fa493a02 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetAdoptionInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetAdoptionInput.graphql.swift @@ -29,33 +29,33 @@ public struct PetAdoptionInput: InputObject { } public var ownerID: ID { - get { __data.ownerID } - set { __data.ownerID = newValue } + get { __data[dynamicMember: "ownerID"] } + set { __data[dynamicMember: "ownerID"] = newValue } } public var petID: ID { - get { __data.petID } - set { __data.petID = newValue } + get { __data[dynamicMember: "petID"] } + set { __data[dynamicMember: "petID"] = newValue } } /// The given name the pet is called by its human. public var humanName: GraphQLNullable { - get { __data.humanName } - set { __data.humanName = newValue } + get { __data[dynamicMember: "humanName"] } + set { __data[dynamicMember: "humanName"] = newValue } } public var favoriteToy: String { - get { __data.favoriteToy } - set { __data.favoriteToy = newValue } + get { __data[dynamicMember: "favoriteToy"] } + set { __data[dynamicMember: "favoriteToy"] = newValue } } public var isSpayedOrNeutered: Bool? { - get { __data.isSpayedOrNeutered } - set { __data.isSpayedOrNeutered = newValue } + get { __data[dynamicMember: "isSpayedOrNeutered"] } + set { __data[dynamicMember: "isSpayedOrNeutered"] = newValue } } public var measurements: GraphQLNullable { - get { __data.measurements } - set { __data.measurements = newValue } + get { __data[dynamicMember: "measurements"] } + set { __data[dynamicMember: "measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetSearchFilters.graphql.swift index a09912d0b3..ebb74bc2ae 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -23,17 +23,17 @@ public struct PetSearchFilters: InputObject { } public var species: [String] { - get { __data.species } - set { __data.species = newValue } + get { __data[dynamicMember: "species"] } + set { __data[dynamicMember: "species"] = newValue } } public var size: GraphQLNullable> { - get { __data.size } - set { __data.size = newValue } + get { __data[dynamicMember: "size"] } + set { __data[dynamicMember: "size"] = newValue } } public var measurements: GraphQLNullable { - get { __data.measurements } - set { __data.measurements = newValue } + get { __data[dynamicMember: "measurements"] } + set { __data[dynamicMember: "measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/MeasurementsInput.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/MeasurementsInput.graphql.swift index 0d00b75f3d..b673339f9f 100644 --- a/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/MeasurementsInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/MeasurementsInput.graphql.swift @@ -34,18 +34,18 @@ public struct MeasurementsInput: InputObject { } public var height: Double { - get { __data.height } - set { __data.height = newValue } + get { __data[dynamicMember: "height"] } + set { __data[dynamicMember: "height"] = newValue } } public var weight: Double { - get { __data.weight } - set { __data.weight = newValue } + get { __data[dynamicMember: "weight"] } + set { __data[dynamicMember: "weight"] = newValue } } @available(*, deprecated, message: "No longer valid.") public var wingspan: GraphQLNullable { - get { __data.wingspan } - set { __data.wingspan = newValue } + get { __data[dynamicMember: "wingspan"] } + set { __data[dynamicMember: "wingspan"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetAdoptionInput.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetAdoptionInput.graphql.swift index 292474147e..d1570ac609 100644 --- a/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetAdoptionInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetAdoptionInput.graphql.swift @@ -29,33 +29,33 @@ public struct PetAdoptionInput: InputObject { } public var ownerID: ID { - get { __data.ownerID } - set { __data.ownerID = newValue } + get { __data[dynamicMember: "ownerID"] } + set { __data[dynamicMember: "ownerID"] = newValue } } public var petID: ID { - get { __data.petID } - set { __data.petID = newValue } + get { __data[dynamicMember: "petID"] } + set { __data[dynamicMember: "petID"] = newValue } } /// The given name the pet is called by its human. public var humanName: GraphQLNullable { - get { __data.humanName } - set { __data.humanName = newValue } + get { __data[dynamicMember: "humanName"] } + set { __data[dynamicMember: "humanName"] = newValue } } public var favoriteToy: String { - get { __data.favoriteToy } - set { __data.favoriteToy = newValue } + get { __data[dynamicMember: "favoriteToy"] } + set { __data[dynamicMember: "favoriteToy"] = newValue } } public var isSpayedOrNeutered: Bool? { - get { __data.isSpayedOrNeutered } - set { __data.isSpayedOrNeutered = newValue } + get { __data[dynamicMember: "isSpayedOrNeutered"] } + set { __data[dynamicMember: "isSpayedOrNeutered"] = newValue } } public var measurements: GraphQLNullable { - get { __data.measurements } - set { __data.measurements = newValue } + get { __data[dynamicMember: "measurements"] } + set { __data[dynamicMember: "measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetSearchFilters.graphql.swift index 972ef94c8c..f2d7dad9d6 100644 --- a/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -23,17 +23,17 @@ public struct PetSearchFilters: InputObject { } public var species: [String] { - get { __data.species } - set { __data.species = newValue } + get { __data[dynamicMember: "species"] } + set { __data[dynamicMember: "species"] = newValue } } public var size: GraphQLNullable> { - get { __data.size } - set { __data.size = newValue } + get { __data[dynamicMember: "size"] } + set { __data[dynamicMember: "size"] = newValue } } public var measurements: GraphQLNullable { - get { __data.measurements } - set { __data.measurements = newValue } + get { __data[dynamicMember: "measurements"] } + set { __data[dynamicMember: "measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift index 0d00b75f3d..b673339f9f 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift @@ -34,18 +34,18 @@ public struct MeasurementsInput: InputObject { } public var height: Double { - get { __data.height } - set { __data.height = newValue } + get { __data[dynamicMember: "height"] } + set { __data[dynamicMember: "height"] = newValue } } public var weight: Double { - get { __data.weight } - set { __data.weight = newValue } + get { __data[dynamicMember: "weight"] } + set { __data[dynamicMember: "weight"] = newValue } } @available(*, deprecated, message: "No longer valid.") public var wingspan: GraphQLNullable { - get { __data.wingspan } - set { __data.wingspan = newValue } + get { __data[dynamicMember: "wingspan"] } + set { __data[dynamicMember: "wingspan"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift index 292474147e..d1570ac609 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift @@ -29,33 +29,33 @@ public struct PetAdoptionInput: InputObject { } public var ownerID: ID { - get { __data.ownerID } - set { __data.ownerID = newValue } + get { __data[dynamicMember: "ownerID"] } + set { __data[dynamicMember: "ownerID"] = newValue } } public var petID: ID { - get { __data.petID } - set { __data.petID = newValue } + get { __data[dynamicMember: "petID"] } + set { __data[dynamicMember: "petID"] = newValue } } /// The given name the pet is called by its human. public var humanName: GraphQLNullable { - get { __data.humanName } - set { __data.humanName = newValue } + get { __data[dynamicMember: "humanName"] } + set { __data[dynamicMember: "humanName"] = newValue } } public var favoriteToy: String { - get { __data.favoriteToy } - set { __data.favoriteToy = newValue } + get { __data[dynamicMember: "favoriteToy"] } + set { __data[dynamicMember: "favoriteToy"] = newValue } } public var isSpayedOrNeutered: Bool? { - get { __data.isSpayedOrNeutered } - set { __data.isSpayedOrNeutered = newValue } + get { __data[dynamicMember: "isSpayedOrNeutered"] } + set { __data[dynamicMember: "isSpayedOrNeutered"] = newValue } } public var measurements: GraphQLNullable { - get { __data.measurements } - set { __data.measurements = newValue } + get { __data[dynamicMember: "measurements"] } + set { __data[dynamicMember: "measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift index 972ef94c8c..f2d7dad9d6 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -23,17 +23,17 @@ public struct PetSearchFilters: InputObject { } public var species: [String] { - get { __data.species } - set { __data.species = newValue } + get { __data[dynamicMember: "species"] } + set { __data[dynamicMember: "species"] = newValue } } public var size: GraphQLNullable> { - get { __data.size } - set { __data.size = newValue } + get { __data[dynamicMember: "size"] } + set { __data[dynamicMember: "size"] = newValue } } public var measurements: GraphQLNullable { - get { __data.measurements } - set { __data.measurements = newValue } + get { __data[dynamicMember: "measurements"] } + set { __data[dynamicMember: "measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift index 0d00b75f3d..b673339f9f 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift @@ -34,18 +34,18 @@ public struct MeasurementsInput: InputObject { } public var height: Double { - get { __data.height } - set { __data.height = newValue } + get { __data[dynamicMember: "height"] } + set { __data[dynamicMember: "height"] = newValue } } public var weight: Double { - get { __data.weight } - set { __data.weight = newValue } + get { __data[dynamicMember: "weight"] } + set { __data[dynamicMember: "weight"] = newValue } } @available(*, deprecated, message: "No longer valid.") public var wingspan: GraphQLNullable { - get { __data.wingspan } - set { __data.wingspan = newValue } + get { __data[dynamicMember: "wingspan"] } + set { __data[dynamicMember: "wingspan"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift index 292474147e..d1570ac609 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift @@ -29,33 +29,33 @@ public struct PetAdoptionInput: InputObject { } public var ownerID: ID { - get { __data.ownerID } - set { __data.ownerID = newValue } + get { __data[dynamicMember: "ownerID"] } + set { __data[dynamicMember: "ownerID"] = newValue } } public var petID: ID { - get { __data.petID } - set { __data.petID = newValue } + get { __data[dynamicMember: "petID"] } + set { __data[dynamicMember: "petID"] = newValue } } /// The given name the pet is called by its human. public var humanName: GraphQLNullable { - get { __data.humanName } - set { __data.humanName = newValue } + get { __data[dynamicMember: "humanName"] } + set { __data[dynamicMember: "humanName"] = newValue } } public var favoriteToy: String { - get { __data.favoriteToy } - set { __data.favoriteToy = newValue } + get { __data[dynamicMember: "favoriteToy"] } + set { __data[dynamicMember: "favoriteToy"] = newValue } } public var isSpayedOrNeutered: Bool? { - get { __data.isSpayedOrNeutered } - set { __data.isSpayedOrNeutered = newValue } + get { __data[dynamicMember: "isSpayedOrNeutered"] } + set { __data[dynamicMember: "isSpayedOrNeutered"] = newValue } } public var measurements: GraphQLNullable { - get { __data.measurements } - set { __data.measurements = newValue } + get { __data[dynamicMember: "measurements"] } + set { __data[dynamicMember: "measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift index 972ef94c8c..f2d7dad9d6 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -23,17 +23,17 @@ public struct PetSearchFilters: InputObject { } public var species: [String] { - get { __data.species } - set { __data.species = newValue } + get { __data[dynamicMember: "species"] } + set { __data[dynamicMember: "species"] = newValue } } public var size: GraphQLNullable> { - get { __data.size } - set { __data.size = newValue } + get { __data[dynamicMember: "size"] } + set { __data[dynamicMember: "size"] = newValue } } public var measurements: GraphQLNullable { - get { __data.measurements } - set { __data.measurements = newValue } + get { __data[dynamicMember: "measurements"] } + set { __data[dynamicMember: "measurements"] = newValue } } } From 1eab1b0256f1454cd2ceb0e3232a372d89a57445 Mon Sep 17 00:00:00 2001 From: Calvin Cestari Date: Tue, 25 Oct 2022 17:28:53 -0700 Subject: [PATCH 04/11] Add field name requiring dynamicMember qualifier --- .../Schema/InputObjects/PetSearchFilters.graphql.swift | 7 +++++++ .../animalkingdom-graphql/AnimalSchema.graphqls | 1 + 2 files changed, 8 insertions(+) diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift index f2d7dad9d6..54d5aa75e6 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -11,17 +11,24 @@ public struct PetSearchFilters: InputObject { } public init( + hash: GraphQLNullable = nil, species: [String], size: GraphQLNullable> = nil, measurements: GraphQLNullable = nil ) { __data = InputDict([ + "hash": hash, "species": species, "size": size, "measurements": measurements ]) } + public var hash: GraphQLNullable { + get { __data[dynamicMember: "hash"] } + set { __data[dynamicMember: "hash"] = newValue } + } + public var species: [String] { get { __data[dynamicMember: "species"] } set { __data[dynamicMember: "species"] = newValue } diff --git a/Sources/AnimalKingdomAPI/animalkingdom-graphql/AnimalSchema.graphqls b/Sources/AnimalKingdomAPI/animalkingdom-graphql/AnimalSchema.graphqls index d1a6974e32..1efe8f8faa 100644 --- a/Sources/AnimalKingdomAPI/animalkingdom-graphql/AnimalSchema.graphqls +++ b/Sources/AnimalKingdomAPI/animalkingdom-graphql/AnimalSchema.graphqls @@ -27,6 +27,7 @@ input MeasurementsInput { } input PetSearchFilters { + hash: String species: [String!]! size: RelativeSize measurements: MeasurementsInput From d93227fb7ed1fd0740e131a0f2e667a474e3000c Mon Sep 17 00:00:00 2001 From: Calvin Cestari Date: Tue, 25 Oct 2022 23:14:11 -0700 Subject: [PATCH 05/11] Remove dynamic member lookup from InputDict --- .../MeasurementsInput.graphql.swift | 12 +- .../PetAdoptionInput.graphql.swift | 24 +- .../PetSearchFilters.graphql.swift | 16 +- .../ApolloAPI/SchemaTypes/InputObject.swift | 7 +- .../Templates/InputObjectTemplate.swift | 4 +- .../InputObjects/ColorInput.graphql.swift | 12 +- .../InputObjects/ReviewInput.graphql.swift | 12 +- .../Templates/InputObjectTemplateTests.swift | 318 +++++++++--------- .../MeasurementsInput.graphql.swift | 12 +- .../PetAdoptionInput.graphql.swift | 24 +- .../PetSearchFilters.graphql.swift | 19 +- .../MeasurementsInput.graphql.swift | 12 +- .../PetAdoptionInput.graphql.swift | 24 +- .../PetSearchFilters.graphql.swift | 12 +- .../MeasurementsInput.graphql.swift | 12 +- .../PetAdoptionInput.graphql.swift | 24 +- .../PetSearchFilters.graphql.swift | 19 +- .../MeasurementsInput.graphql.swift | 12 +- .../PetAdoptionInput.graphql.swift | 24 +- .../PetSearchFilters.graphql.swift | 12 +- .../MeasurementsInput.graphql.swift | 12 +- .../PetAdoptionInput.graphql.swift | 24 +- .../PetSearchFilters.graphql.swift | 19 +- .../MeasurementsInput.graphql.swift | 12 +- .../PetAdoptionInput.graphql.swift | 24 +- .../PetSearchFilters.graphql.swift | 19 +- 26 files changed, 374 insertions(+), 347 deletions(-) diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift index b673339f9f..4479e2bd3b 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift @@ -34,18 +34,18 @@ public struct MeasurementsInput: InputObject { } public var height: Double { - get { __data[dynamicMember: "height"] } - set { __data[dynamicMember: "height"] = newValue } + get { __data["height"] } + set { __data["height"] = newValue } } public var weight: Double { - get { __data[dynamicMember: "weight"] } - set { __data[dynamicMember: "weight"] = newValue } + get { __data["weight"] } + set { __data["weight"] = newValue } } @available(*, deprecated, message: "No longer valid.") public var wingspan: GraphQLNullable { - get { __data[dynamicMember: "wingspan"] } - set { __data[dynamicMember: "wingspan"] = newValue } + get { __data["wingspan"] } + set { __data["wingspan"] = newValue } } } diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift index d1570ac609..06a7b63b95 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift @@ -29,33 +29,33 @@ public struct PetAdoptionInput: InputObject { } public var ownerID: ID { - get { __data[dynamicMember: "ownerID"] } - set { __data[dynamicMember: "ownerID"] = newValue } + get { __data["ownerID"] } + set { __data["ownerID"] = newValue } } public var petID: ID { - get { __data[dynamicMember: "petID"] } - set { __data[dynamicMember: "petID"] = newValue } + get { __data["petID"] } + set { __data["petID"] = newValue } } /// The given name the pet is called by its human. public var humanName: GraphQLNullable { - get { __data[dynamicMember: "humanName"] } - set { __data[dynamicMember: "humanName"] = newValue } + get { __data["humanName"] } + set { __data["humanName"] = newValue } } public var favoriteToy: String { - get { __data[dynamicMember: "favoriteToy"] } - set { __data[dynamicMember: "favoriteToy"] = newValue } + get { __data["favoriteToy"] } + set { __data["favoriteToy"] = newValue } } public var isSpayedOrNeutered: Bool? { - get { __data[dynamicMember: "isSpayedOrNeutered"] } - set { __data[dynamicMember: "isSpayedOrNeutered"] = newValue } + get { __data["isSpayedOrNeutered"] } + set { __data["isSpayedOrNeutered"] = newValue } } public var measurements: GraphQLNullable { - get { __data[dynamicMember: "measurements"] } - set { __data[dynamicMember: "measurements"] = newValue } + get { __data["measurements"] } + set { __data["measurements"] = newValue } } } diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift index 54d5aa75e6..de41e1bbc1 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -25,22 +25,22 @@ public struct PetSearchFilters: InputObject { } public var hash: GraphQLNullable { - get { __data[dynamicMember: "hash"] } - set { __data[dynamicMember: "hash"] = newValue } + get { __data["hash"] } + set { __data["hash"] = newValue } } public var species: [String] { - get { __data[dynamicMember: "species"] } - set { __data[dynamicMember: "species"] = newValue } + get { __data["species"] } + set { __data["species"] = newValue } } public var size: GraphQLNullable> { - get { __data[dynamicMember: "size"] } - set { __data[dynamicMember: "size"] = newValue } + get { __data["size"] } + set { __data["size"] = newValue } } public var measurements: GraphQLNullable { - get { __data[dynamicMember: "measurements"] } - set { __data[dynamicMember: "measurements"] = newValue } + get { __data["measurements"] } + set { __data["measurements"] = newValue } } } diff --git a/Sources/ApolloAPI/SchemaTypes/InputObject.swift b/Sources/ApolloAPI/SchemaTypes/InputObject.swift index 76703cc4ba..cb8389dfe9 100644 --- a/Sources/ApolloAPI/SchemaTypes/InputObject.swift +++ b/Sources/ApolloAPI/SchemaTypes/InputObject.swift @@ -20,7 +20,6 @@ extension InputObject { } /// A structure that wraps the underlying data dictionary used by `InputObject`s. -@dynamicMemberLookup public struct InputDict: GraphQLOperationVariableValue, Hashable { private var data: [String: GraphQLOperationVariableValue] @@ -31,9 +30,9 @@ public struct InputDict: GraphQLOperationVariableValue, Hashable { public var _jsonEncodableValue: (any JSONEncodable)? { data._jsonEncodableObject } - public subscript(dynamicMember key: StaticString) -> T { - get { data[key.description] as! T } - set { data[key.description] = newValue } + public subscript(key: String) -> T { + get { data[key] as! T } + set { data[key] = newValue } } public static func == (lhs: InputDict, rhs: InputDict) -> Bool { diff --git a/Sources/ApolloCodegenLib/Templates/InputObjectTemplate.swift b/Sources/ApolloCodegenLib/Templates/InputObjectTemplate.swift index 7a33886651..5e3cc34527 100644 --- a/Sources/ApolloCodegenLib/Templates/InputObjectTemplate.swift +++ b/Sources/ApolloCodegenLib/Templates/InputObjectTemplate.swift @@ -111,8 +111,8 @@ struct InputObjectTemplate: TemplateRenderer { \(documentation: field.documentation, config: config) \(deprecationReason: field.deprecationReason, config: config) public var \(field.name.asInputParameterName): \(field.renderInputValueType(config: config.config)) { - get { __data[dynamicMember: "\(field.name.asInputParameterName)"] } - set { __data[dynamicMember: "\(field.name.asInputParameterName)"] = newValue } + get { __data["\(field.name.asInputParameterName)"] } + set { __data["\(field.name.asInputParameterName)"] = newValue } } """ } diff --git a/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ColorInput.graphql.swift b/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ColorInput.graphql.swift index 72dbc7ada7..2f4dd87d0c 100644 --- a/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ColorInput.graphql.swift +++ b/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ColorInput.graphql.swift @@ -24,17 +24,17 @@ public struct ColorInput: InputObject { } public var red: Int { - get { __data[dynamicMember: "red"] } - set { __data[dynamicMember: "red"] = newValue } + get { __data["red"] } + set { __data["red"] = newValue } } public var green: Int { - get { __data[dynamicMember: "green"] } - set { __data[dynamicMember: "green"] = newValue } + get { __data["green"] } + set { __data["green"] = newValue } } public var blue: Int { - get { __data[dynamicMember: "blue"] } - set { __data[dynamicMember: "blue"] = newValue } + get { __data["blue"] } + set { __data["blue"] = newValue } } } diff --git a/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ReviewInput.graphql.swift b/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ReviewInput.graphql.swift index 570e6fb261..b5fdb813a8 100644 --- a/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ReviewInput.graphql.swift +++ b/Sources/StarWarsAPI/StarWarsAPI/Sources/Schema/InputObjects/ReviewInput.graphql.swift @@ -25,19 +25,19 @@ public struct ReviewInput: InputObject { /// 0-5 stars public var stars: Int { - get { __data[dynamicMember: "stars"] } - set { __data[dynamicMember: "stars"] = newValue } + get { __data["stars"] } + set { __data["stars"] = newValue } } /// Comment about the movie, optional public var commentary: GraphQLNullable { - get { __data[dynamicMember: "commentary"] } - set { __data[dynamicMember: "commentary"] = newValue } + get { __data["commentary"] } + set { __data["commentary"] = newValue } } /// Favorite color, optional public var favorite_color: GraphQLNullable { - get { __data[dynamicMember: "favorite_color"] } - set { __data[dynamicMember: "favorite_color"] = newValue } + get { __data["favorite_color"] } + set { __data["favorite_color"] = newValue } } } diff --git a/Tests/ApolloCodegenTests/CodeGeneration/Templates/InputObjectTemplateTests.swift b/Tests/ApolloCodegenTests/CodeGeneration/Templates/InputObjectTemplateTests.swift index cd2d7d4e69..965acc6831 100644 --- a/Tests/ApolloCodegenTests/CodeGeneration/Templates/InputObjectTemplateTests.swift +++ b/Tests/ApolloCodegenTests/CodeGeneration/Templates/InputObjectTemplateTests.swift @@ -171,8 +171,8 @@ class InputObjectTemplateTests: XCTestCase { } public var field: GraphQLNullable { - get { __data[dynamicMember: "field"] } - set { __data[dynamicMember: "field"] = newValue } + get { __data["field"] } + set { __data["field"] = newValue } } } @@ -285,58 +285,58 @@ class InputObjectTemplateTests: XCTestCase { } public var stringField: GraphQLNullable { - get { __data[dynamicMember: "stringField"] } - set { __data[dynamicMember: "stringField"] = newValue } + get { __data["stringField"] } + set { __data["stringField"] = newValue } } public var intField: GraphQLNullable { - get { __data[dynamicMember: "intField"] } - set { __data[dynamicMember: "intField"] = newValue } + get { __data["intField"] } + set { __data["intField"] = newValue } } public var boolField: GraphQLNullable { - get { __data[dynamicMember: "boolField"] } - set { __data[dynamicMember: "boolField"] = newValue } + get { __data["boolField"] } + set { __data["boolField"] = newValue } } public var floatField: GraphQLNullable { - get { __data[dynamicMember: "floatField"] } - set { __data[dynamicMember: "floatField"] = newValue } + get { __data["floatField"] } + set { __data["floatField"] = newValue } } public var customScalarField: GraphQLNullable { - get { __data[dynamicMember: "customScalarField"] } - set { __data[dynamicMember: "customScalarField"] = newValue } + get { __data["customScalarField"] } + set { __data["customScalarField"] = newValue } } public var lowercaseCustomScalarField: GraphQLNullable { - get { __data[dynamicMember: "lowercaseCustomScalarField"] } - set { __data[dynamicMember: "lowercaseCustomScalarField"] = newValue } + get { __data["lowercaseCustomScalarField"] } + set { __data["lowercaseCustomScalarField"] = newValue } } public var enumField: GraphQLNullable> { - get { __data[dynamicMember: "enumField"] } - set { __data[dynamicMember: "enumField"] = newValue } + get { __data["enumField"] } + set { __data["enumField"] = newValue } } public var lowercaseEnumField: GraphQLNullable> { - get { __data[dynamicMember: "lowercaseEnumField"] } - set { __data[dynamicMember: "lowercaseEnumField"] = newValue } + get { __data["lowercaseEnumField"] } + set { __data["lowercaseEnumField"] = newValue } } public var inputField: GraphQLNullable { - get { __data[dynamicMember: "inputField"] } - set { __data[dynamicMember: "inputField"] = newValue } + get { __data["inputField"] } + set { __data["inputField"] = newValue } } public var lowercaseInputField: GraphQLNullable { - get { __data[dynamicMember: "lowercaseInputField"] } - set { __data[dynamicMember: "lowercaseInputField"] = newValue } + get { __data["lowercaseInputField"] } + set { __data["lowercaseInputField"] = newValue } } public var listField: GraphQLNullable<[String?]> { - get { __data[dynamicMember: "listField"] } - set { __data[dynamicMember: "listField"] = newValue } + get { __data["listField"] } + set { __data["listField"] = newValue } } """ @@ -379,13 +379,13 @@ class InputObjectTemplateTests: XCTestCase { } public var enumField: GraphQLNullable> { - get { __data[dynamicMember: "enumField"] } - set { __data[dynamicMember: "enumField"] = newValue } + get { __data["enumField"] } + set { __data["enumField"] = newValue } } public var inputField: GraphQLNullable { - get { __data[dynamicMember: "inputField"] } - set { __data[dynamicMember: "inputField"] = newValue } + get { __data["inputField"] } + set { __data["inputField"] = newValue } } """ @@ -401,13 +401,13 @@ class InputObjectTemplateTests: XCTestCase { } public var enumField: GraphQLNullable> { - get { __data[dynamicMember: "enumField"] } - set { __data[dynamicMember: "enumField"] = newValue } + get { __data["enumField"] } + set { __data["enumField"] = newValue } } public var inputField: GraphQLNullable { - get { __data[dynamicMember: "inputField"] } - set { __data[dynamicMember: "inputField"] = newValue } + get { __data["inputField"] } + set { __data["inputField"] = newValue } } """ @@ -1142,24 +1142,24 @@ class InputObjectTemplateTests: XCTestCase { @available(*, deprecated, message: "Not used anymore!") public var fieldOne: String { - get { __data[dynamicMember: "fieldOne"] } - set { __data[dynamicMember: "fieldOne"] = newValue } + get { __data["fieldOne"] } + set { __data["fieldOne"] = newValue } } public var fieldTwo: String { - get { __data[dynamicMember: "fieldTwo"] } - set { __data[dynamicMember: "fieldTwo"] = newValue } + get { __data["fieldTwo"] } + set { __data["fieldTwo"] = newValue } } public var fieldThree: String { - get { __data[dynamicMember: "fieldThree"] } - set { __data[dynamicMember: "fieldThree"] = newValue } + get { __data["fieldThree"] } + set { __data["fieldThree"] = newValue } } @available(*, deprecated, message: "Stop using this field!") public var fieldFour: String { - get { __data[dynamicMember: "fieldFour"] } - set { __data[dynamicMember: "fieldFour"] = newValue } + get { __data["fieldFour"] } + set { __data["fieldFour"] = newValue } } """ @@ -1219,18 +1219,18 @@ class InputObjectTemplateTests: XCTestCase { } public var fieldOne: String { - get { __data[dynamicMember: "fieldOne"] } - set { __data[dynamicMember: "fieldOne"] = newValue } + get { __data["fieldOne"] } + set { __data["fieldOne"] = newValue } } public var fieldTwo: String { - get { __data[dynamicMember: "fieldTwo"] } - set { __data[dynamicMember: "fieldTwo"] = newValue } + get { __data["fieldTwo"] } + set { __data["fieldTwo"] = newValue } } public var fieldThree: String { - get { __data[dynamicMember: "fieldThree"] } - set { __data[dynamicMember: "fieldThree"] = newValue } + get { __data["fieldThree"] } + set { __data["fieldThree"] = newValue } } """ @@ -1608,253 +1608,253 @@ class InputObjectTemplateTests: XCTestCase { } public var `associatedtype`: String { - get { __data[dynamicMember: "`associatedtype`"] } - set { __data[dynamicMember: "`associatedtype`"] = newValue } + get { __data["`associatedtype`"] } + set { __data["`associatedtype`"] = newValue } } public var `class`: String { - get { __data[dynamicMember: "`class`"] } - set { __data[dynamicMember: "`class`"] = newValue } + get { __data["`class`"] } + set { __data["`class`"] = newValue } } public var `deinit`: String { - get { __data[dynamicMember: "`deinit`"] } - set { __data[dynamicMember: "`deinit`"] = newValue } + get { __data["`deinit`"] } + set { __data["`deinit`"] = newValue } } public var `enum`: String { - get { __data[dynamicMember: "`enum`"] } - set { __data[dynamicMember: "`enum`"] = newValue } + get { __data["`enum`"] } + set { __data["`enum`"] = newValue } } public var `extension`: String { - get { __data[dynamicMember: "`extension`"] } - set { __data[dynamicMember: "`extension`"] = newValue } + get { __data["`extension`"] } + set { __data["`extension`"] = newValue } } public var `fileprivate`: String { - get { __data[dynamicMember: "`fileprivate`"] } - set { __data[dynamicMember: "`fileprivate`"] = newValue } + get { __data["`fileprivate`"] } + set { __data["`fileprivate`"] = newValue } } public var `func`: String { - get { __data[dynamicMember: "`func`"] } - set { __data[dynamicMember: "`func`"] = newValue } + get { __data["`func`"] } + set { __data["`func`"] = newValue } } public var `import`: String { - get { __data[dynamicMember: "`import`"] } - set { __data[dynamicMember: "`import`"] = newValue } + get { __data["`import`"] } + set { __data["`import`"] = newValue } } public var `init`: String { - get { __data[dynamicMember: "`init`"] } - set { __data[dynamicMember: "`init`"] = newValue } + get { __data["`init`"] } + set { __data["`init`"] = newValue } } public var `inout`: String { - get { __data[dynamicMember: "`inout`"] } - set { __data[dynamicMember: "`inout`"] = newValue } + get { __data["`inout`"] } + set { __data["`inout`"] = newValue } } public var `internal`: String { - get { __data[dynamicMember: "`internal`"] } - set { __data[dynamicMember: "`internal`"] = newValue } + get { __data["`internal`"] } + set { __data["`internal`"] = newValue } } public var `let`: String { - get { __data[dynamicMember: "`let`"] } - set { __data[dynamicMember: "`let`"] = newValue } + get { __data["`let`"] } + set { __data["`let`"] = newValue } } public var `operator`: String { - get { __data[dynamicMember: "`operator`"] } - set { __data[dynamicMember: "`operator`"] = newValue } + get { __data["`operator`"] } + set { __data["`operator`"] = newValue } } public var `private`: String { - get { __data[dynamicMember: "`private`"] } - set { __data[dynamicMember: "`private`"] = newValue } + get { __data["`private`"] } + set { __data["`private`"] = newValue } } public var `precedencegroup`: String { - get { __data[dynamicMember: "`precedencegroup`"] } - set { __data[dynamicMember: "`precedencegroup`"] = newValue } + get { __data["`precedencegroup`"] } + set { __data["`precedencegroup`"] = newValue } } public var `protocol`: String { - get { __data[dynamicMember: "`protocol`"] } - set { __data[dynamicMember: "`protocol`"] = newValue } + get { __data["`protocol`"] } + set { __data["`protocol`"] = newValue } } public var `public`: String { - get { __data[dynamicMember: "`public`"] } - set { __data[dynamicMember: "`public`"] = newValue } + get { __data["`public`"] } + set { __data["`public`"] = newValue } } public var `rethrows`: String { - get { __data[dynamicMember: "`rethrows`"] } - set { __data[dynamicMember: "`rethrows`"] = newValue } + get { __data["`rethrows`"] } + set { __data["`rethrows`"] = newValue } } public var `static`: String { - get { __data[dynamicMember: "`static`"] } - set { __data[dynamicMember: "`static`"] = newValue } + get { __data["`static`"] } + set { __data["`static`"] = newValue } } public var `struct`: String { - get { __data[dynamicMember: "`struct`"] } - set { __data[dynamicMember: "`struct`"] = newValue } + get { __data["`struct`"] } + set { __data["`struct`"] = newValue } } public var `subscript`: String { - get { __data[dynamicMember: "`subscript`"] } - set { __data[dynamicMember: "`subscript`"] = newValue } + get { __data["`subscript`"] } + set { __data["`subscript`"] = newValue } } public var `typealias`: String { - get { __data[dynamicMember: "`typealias`"] } - set { __data[dynamicMember: "`typealias`"] = newValue } + get { __data["`typealias`"] } + set { __data["`typealias`"] = newValue } } public var `var`: String { - get { __data[dynamicMember: "`var`"] } - set { __data[dynamicMember: "`var`"] = newValue } + get { __data["`var`"] } + set { __data["`var`"] = newValue } } public var `break`: String { - get { __data[dynamicMember: "`break`"] } - set { __data[dynamicMember: "`break`"] = newValue } + get { __data["`break`"] } + set { __data["`break`"] = newValue } } public var `case`: String { - get { __data[dynamicMember: "`case`"] } - set { __data[dynamicMember: "`case`"] = newValue } + get { __data["`case`"] } + set { __data["`case`"] = newValue } } public var `catch`: String { - get { __data[dynamicMember: "`catch`"] } - set { __data[dynamicMember: "`catch`"] = newValue } + get { __data["`catch`"] } + set { __data["`catch`"] = newValue } } public var `continue`: String { - get { __data[dynamicMember: "`continue`"] } - set { __data[dynamicMember: "`continue`"] = newValue } + get { __data["`continue`"] } + set { __data["`continue`"] = newValue } } public var `default`: String { - get { __data[dynamicMember: "`default`"] } - set { __data[dynamicMember: "`default`"] = newValue } + get { __data["`default`"] } + set { __data["`default`"] = newValue } } public var `defer`: String { - get { __data[dynamicMember: "`defer`"] } - set { __data[dynamicMember: "`defer`"] = newValue } + get { __data["`defer`"] } + set { __data["`defer`"] = newValue } } public var `do`: String { - get { __data[dynamicMember: "`do`"] } - set { __data[dynamicMember: "`do`"] = newValue } + get { __data["`do`"] } + set { __data["`do`"] = newValue } } public var `else`: String { - get { __data[dynamicMember: "`else`"] } - set { __data[dynamicMember: "`else`"] = newValue } + get { __data["`else`"] } + set { __data["`else`"] = newValue } } public var `fallthrough`: String { - get { __data[dynamicMember: "`fallthrough`"] } - set { __data[dynamicMember: "`fallthrough`"] = newValue } + get { __data["`fallthrough`"] } + set { __data["`fallthrough`"] = newValue } } public var `guard`: String { - get { __data[dynamicMember: "`guard`"] } - set { __data[dynamicMember: "`guard`"] = newValue } + get { __data["`guard`"] } + set { __data["`guard`"] = newValue } } public var `if`: String { - get { __data[dynamicMember: "`if`"] } - set { __data[dynamicMember: "`if`"] = newValue } + get { __data["`if`"] } + set { __data["`if`"] = newValue } } public var `in`: String { - get { __data[dynamicMember: "`in`"] } - set { __data[dynamicMember: "`in`"] = newValue } + get { __data["`in`"] } + set { __data["`in`"] = newValue } } public var `repeat`: String { - get { __data[dynamicMember: "`repeat`"] } - set { __data[dynamicMember: "`repeat`"] = newValue } + get { __data["`repeat`"] } + set { __data["`repeat`"] = newValue } } public var `return`: String { - get { __data[dynamicMember: "`return`"] } - set { __data[dynamicMember: "`return`"] = newValue } + get { __data["`return`"] } + set { __data["`return`"] = newValue } } public var `throw`: String { - get { __data[dynamicMember: "`throw`"] } - set { __data[dynamicMember: "`throw`"] = newValue } + get { __data["`throw`"] } + set { __data["`throw`"] = newValue } } public var `switch`: String { - get { __data[dynamicMember: "`switch`"] } - set { __data[dynamicMember: "`switch`"] = newValue } + get { __data["`switch`"] } + set { __data["`switch`"] = newValue } } public var `where`: String { - get { __data[dynamicMember: "`where`"] } - set { __data[dynamicMember: "`where`"] = newValue } + get { __data["`where`"] } + set { __data["`where`"] = newValue } } public var `while`: String { - get { __data[dynamicMember: "`while`"] } - set { __data[dynamicMember: "`while`"] = newValue } + get { __data["`while`"] } + set { __data["`while`"] = newValue } } public var `as`: String { - get { __data[dynamicMember: "`as`"] } - set { __data[dynamicMember: "`as`"] = newValue } + get { __data["`as`"] } + set { __data["`as`"] = newValue } } public var `false`: String { - get { __data[dynamicMember: "`false`"] } - set { __data[dynamicMember: "`false`"] = newValue } + get { __data["`false`"] } + set { __data["`false`"] = newValue } } public var `is`: String { - get { __data[dynamicMember: "`is`"] } - set { __data[dynamicMember: "`is`"] = newValue } + get { __data["`is`"] } + set { __data["`is`"] = newValue } } public var `nil`: String { - get { __data[dynamicMember: "`nil`"] } - set { __data[dynamicMember: "`nil`"] = newValue } + get { __data["`nil`"] } + set { __data["`nil`"] = newValue } } public var `self`: String { - get { __data[dynamicMember: "`self`"] } - set { __data[dynamicMember: "`self`"] = newValue } + get { __data["`self`"] } + set { __data["`self`"] = newValue } } public var `super`: String { - get { __data[dynamicMember: "`super`"] } - set { __data[dynamicMember: "`super`"] = newValue } + get { __data["`super`"] } + set { __data["`super`"] = newValue } } public var `throws`: String { - get { __data[dynamicMember: "`throws`"] } - set { __data[dynamicMember: "`throws`"] = newValue } + get { __data["`throws`"] } + set { __data["`throws`"] = newValue } } public var `true`: String { - get { __data[dynamicMember: "`true`"] } - set { __data[dynamicMember: "`true`"] = newValue } + get { __data["`true`"] } + set { __data["`true`"] = newValue } } public var `try`: String { - get { __data[dynamicMember: "`try`"] } - set { __data[dynamicMember: "`try`"] = newValue } + get { __data["`try`"] } + set { __data["`try`"] = newValue } } """ @@ -1906,13 +1906,13 @@ class InputObjectTemplateTests: XCTestCase { } public var enumField: GraphQLNullable> { - get { __data[dynamicMember: "enumField"] } - set { __data[dynamicMember: "enumField"] = newValue } + get { __data["enumField"] } + set { __data["enumField"] = newValue } } public var inputField: GraphQLNullable { - get { __data[dynamicMember: "inputField"] } - set { __data[dynamicMember: "inputField"] = newValue } + get { __data["inputField"] } + set { __data["inputField"] = newValue } } """ @@ -1962,13 +1962,13 @@ class InputObjectTemplateTests: XCTestCase { } public var enumField: GraphQLNullable> { - get { __data[dynamicMember: "enumField"] } - set { __data[dynamicMember: "enumField"] = newValue } + get { __data["enumField"] } + set { __data["enumField"] = newValue } } public var inputField: GraphQLNullable { - get { __data[dynamicMember: "inputField"] } - set { __data[dynamicMember: "inputField"] = newValue } + get { __data["inputField"] } + set { __data["inputField"] = newValue } } """ @@ -2018,13 +2018,13 @@ class InputObjectTemplateTests: XCTestCase { } public var enumField: GraphQLNullable> { - get { __data[dynamicMember: "enumField"] } - set { __data[dynamicMember: "enumField"] = newValue } + get { __data["enumField"] } + set { __data["enumField"] = newValue } } public var inputField: GraphQLNullable { - get { __data[dynamicMember: "inputField"] } - set { __data[dynamicMember: "inputField"] = newValue } + get { __data["inputField"] } + set { __data["inputField"] = newValue } } """ @@ -2035,7 +2035,7 @@ class InputObjectTemplateTests: XCTestCase { expect(actual).to(equalLineByLine(expected, atLine: 8, ignoringExtraLines: true)) } - func test__casing__givenLowercasedSchemaName_listField_generatesWithFirstUppercasedzNamespace() throws { + func test__casing__givenLowercasedSchemaName_listField_generatesWithFirstUppercasedNamespace() throws { // given buildSubject( fields: [GraphQLInputField.mock( diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/MeasurementsInput.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/MeasurementsInput.graphql.swift index 381bf9c46a..f6dcac3e48 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/MeasurementsInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/MeasurementsInput.graphql.swift @@ -35,19 +35,19 @@ public extension MyGraphQLSchema { } public var height: Double { - get { __data[dynamicMember: "height"] } - set { __data[dynamicMember: "height"] = newValue } + get { __data["height"] } + set { __data["height"] = newValue } } public var weight: Double { - get { __data[dynamicMember: "weight"] } - set { __data[dynamicMember: "weight"] = newValue } + get { __data["weight"] } + set { __data["weight"] = newValue } } @available(*, deprecated, message: "No longer valid.") public var wingspan: GraphQLNullable { - get { __data[dynamicMember: "wingspan"] } - set { __data[dynamicMember: "wingspan"] = newValue } + get { __data["wingspan"] } + set { __data["wingspan"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetAdoptionInput.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetAdoptionInput.graphql.swift index c22aec5303..f7afa11e3b 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetAdoptionInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetAdoptionInput.graphql.swift @@ -30,34 +30,34 @@ public extension MyGraphQLSchema { } public var ownerID: ID { - get { __data[dynamicMember: "ownerID"] } - set { __data[dynamicMember: "ownerID"] = newValue } + get { __data["ownerID"] } + set { __data["ownerID"] = newValue } } public var petID: ID { - get { __data[dynamicMember: "petID"] } - set { __data[dynamicMember: "petID"] = newValue } + get { __data["petID"] } + set { __data["petID"] = newValue } } /// The given name the pet is called by its human. public var humanName: GraphQLNullable { - get { __data[dynamicMember: "humanName"] } - set { __data[dynamicMember: "humanName"] = newValue } + get { __data["humanName"] } + set { __data["humanName"] = newValue } } public var favoriteToy: String { - get { __data[dynamicMember: "favoriteToy"] } - set { __data[dynamicMember: "favoriteToy"] = newValue } + get { __data["favoriteToy"] } + set { __data["favoriteToy"] = newValue } } public var isSpayedOrNeutered: Bool? { - get { __data[dynamicMember: "isSpayedOrNeutered"] } - set { __data[dynamicMember: "isSpayedOrNeutered"] = newValue } + get { __data["isSpayedOrNeutered"] } + set { __data["isSpayedOrNeutered"] = newValue } } public var measurements: GraphQLNullable { - get { __data[dynamicMember: "measurements"] } - set { __data[dynamicMember: "measurements"] = newValue } + get { __data["measurements"] } + set { __data["measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetSearchFilters.graphql.swift index 4d1f7bb2ae..19a281b699 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -12,30 +12,37 @@ public extension MyGraphQLSchema { } public init( + hash: GraphQLNullable = nil, species: [String], size: GraphQLNullable> = nil, measurements: GraphQLNullable = nil ) { __data = InputDict([ + "hash": hash, "species": species, "size": size, "measurements": measurements ]) } + public var hash: GraphQLNullable { + get { __data["hash"] } + set { __data["hash"] = newValue } + } + public var species: [String] { - get { __data[dynamicMember: "species"] } - set { __data[dynamicMember: "species"] = newValue } + get { __data["species"] } + set { __data["species"] = newValue } } public var size: GraphQLNullable> { - get { __data[dynamicMember: "size"] } - set { __data[dynamicMember: "size"] = newValue } + get { __data["size"] } + set { __data["size"] = newValue } } public var measurements: GraphQLNullable { - get { __data[dynamicMember: "measurements"] } - set { __data[dynamicMember: "measurements"] = newValue } + get { __data["measurements"] } + set { __data["measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/MeasurementsInput.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/MeasurementsInput.graphql.swift index a7f85b0352..02756a41ef 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/MeasurementsInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/MeasurementsInput.graphql.swift @@ -35,19 +35,19 @@ public extension MySchemaModule { } public var height: Double { - get { __data[dynamicMember: "height"] } - set { __data[dynamicMember: "height"] = newValue } + get { __data["height"] } + set { __data["height"] = newValue } } public var weight: Double { - get { __data[dynamicMember: "weight"] } - set { __data[dynamicMember: "weight"] = newValue } + get { __data["weight"] } + set { __data["weight"] = newValue } } @available(*, deprecated, message: "No longer valid.") public var wingspan: GraphQLNullable { - get { __data[dynamicMember: "wingspan"] } - set { __data[dynamicMember: "wingspan"] = newValue } + get { __data["wingspan"] } + set { __data["wingspan"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetAdoptionInput.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetAdoptionInput.graphql.swift index ff08007381..a247e9c477 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetAdoptionInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetAdoptionInput.graphql.swift @@ -30,34 +30,34 @@ public extension MySchemaModule { } public var ownerID: MySchemaModule.ID { - get { __data[dynamicMember: "ownerID"] } - set { __data[dynamicMember: "ownerID"] = newValue } + get { __data["ownerID"] } + set { __data["ownerID"] = newValue } } public var petID: MySchemaModule.ID { - get { __data[dynamicMember: "petID"] } - set { __data[dynamicMember: "petID"] = newValue } + get { __data["petID"] } + set { __data["petID"] = newValue } } /// The given name the pet is called by its human. public var humanName: GraphQLNullable { - get { __data[dynamicMember: "humanName"] } - set { __data[dynamicMember: "humanName"] = newValue } + get { __data["humanName"] } + set { __data["humanName"] = newValue } } public var favoriteToy: String { - get { __data[dynamicMember: "favoriteToy"] } - set { __data[dynamicMember: "favoriteToy"] = newValue } + get { __data["favoriteToy"] } + set { __data["favoriteToy"] = newValue } } public var isSpayedOrNeutered: Bool? { - get { __data[dynamicMember: "isSpayedOrNeutered"] } - set { __data[dynamicMember: "isSpayedOrNeutered"] = newValue } + get { __data["isSpayedOrNeutered"] } + set { __data["isSpayedOrNeutered"] = newValue } } public var measurements: GraphQLNullable { - get { __data[dynamicMember: "measurements"] } - set { __data[dynamicMember: "measurements"] = newValue } + get { __data["measurements"] } + set { __data["measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetSearchFilters.graphql.swift index 724bfd9039..0e4bbdbd90 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-RelativeAbsolute/PackageTwo/Sources/PackageTwo/InputObjects/PetSearchFilters.graphql.swift @@ -24,18 +24,18 @@ public extension MySchemaModule { } public var species: [String] { - get { __data[dynamicMember: "species"] } - set { __data[dynamicMember: "species"] = newValue } + get { __data["species"] } + set { __data["species"] = newValue } } public var size: GraphQLNullable> { - get { __data[dynamicMember: "size"] } - set { __data[dynamicMember: "size"] = newValue } + get { __data["size"] } + set { __data["size"] = newValue } } public var measurements: GraphQLNullable { - get { __data[dynamicMember: "measurements"] } - set { __data[dynamicMember: "measurements"] = newValue } + get { __data["measurements"] } + set { __data["measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/MeasurementsInput.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/MeasurementsInput.graphql.swift index 206bede742..d0432ffafe 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/MeasurementsInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/MeasurementsInput.graphql.swift @@ -34,18 +34,18 @@ public struct MeasurementsInput: InputObject { } public var height: Double { - get { __data[dynamicMember: "height"] } - set { __data[dynamicMember: "height"] = newValue } + get { __data["height"] } + set { __data["height"] = newValue } } public var weight: Double { - get { __data[dynamicMember: "weight"] } - set { __data[dynamicMember: "weight"] = newValue } + get { __data["weight"] } + set { __data["weight"] = newValue } } @available(*, deprecated, message: "No longer valid.") public var wingspan: GraphQLNullable { - get { __data[dynamicMember: "wingspan"] } - set { __data[dynamicMember: "wingspan"] = newValue } + get { __data["wingspan"] } + set { __data["wingspan"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetAdoptionInput.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetAdoptionInput.graphql.swift index 51fa493a02..a05f723153 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetAdoptionInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetAdoptionInput.graphql.swift @@ -29,33 +29,33 @@ public struct PetAdoptionInput: InputObject { } public var ownerID: ID { - get { __data[dynamicMember: "ownerID"] } - set { __data[dynamicMember: "ownerID"] = newValue } + get { __data["ownerID"] } + set { __data["ownerID"] = newValue } } public var petID: ID { - get { __data[dynamicMember: "petID"] } - set { __data[dynamicMember: "petID"] = newValue } + get { __data["petID"] } + set { __data["petID"] = newValue } } /// The given name the pet is called by its human. public var humanName: GraphQLNullable { - get { __data[dynamicMember: "humanName"] } - set { __data[dynamicMember: "humanName"] = newValue } + get { __data["humanName"] } + set { __data["humanName"] = newValue } } public var favoriteToy: String { - get { __data[dynamicMember: "favoriteToy"] } - set { __data[dynamicMember: "favoriteToy"] = newValue } + get { __data["favoriteToy"] } + set { __data["favoriteToy"] = newValue } } public var isSpayedOrNeutered: Bool? { - get { __data[dynamicMember: "isSpayedOrNeutered"] } - set { __data[dynamicMember: "isSpayedOrNeutered"] = newValue } + get { __data["isSpayedOrNeutered"] } + set { __data["isSpayedOrNeutered"] = newValue } } public var measurements: GraphQLNullable { - get { __data[dynamicMember: "measurements"] } - set { __data[dynamicMember: "measurements"] = newValue } + get { __data["measurements"] } + set { __data["measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetSearchFilters.graphql.swift index ebb74bc2ae..11f64b4bb8 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -11,29 +11,36 @@ public struct PetSearchFilters: InputObject { } public init( + hash: GraphQLNullable = nil, species: [String], size: GraphQLNullable> = nil, measurements: GraphQLNullable = nil ) { __data = InputDict([ + "hash": hash, "species": species, "size": size, "measurements": measurements ]) } + public var hash: GraphQLNullable { + get { __data["hash"] } + set { __data["hash"] = newValue } + } + public var species: [String] { - get { __data[dynamicMember: "species"] } - set { __data[dynamicMember: "species"] = newValue } + get { __data["species"] } + set { __data["species"] = newValue } } public var size: GraphQLNullable> { - get { __data[dynamicMember: "size"] } - set { __data[dynamicMember: "size"] = newValue } + get { __data["size"] } + set { __data["size"] = newValue } } public var measurements: GraphQLNullable { - get { __data[dynamicMember: "measurements"] } - set { __data[dynamicMember: "measurements"] = newValue } + get { __data["measurements"] } + set { __data["measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/MeasurementsInput.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/MeasurementsInput.graphql.swift index b673339f9f..4479e2bd3b 100644 --- a/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/MeasurementsInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/MeasurementsInput.graphql.swift @@ -34,18 +34,18 @@ public struct MeasurementsInput: InputObject { } public var height: Double { - get { __data[dynamicMember: "height"] } - set { __data[dynamicMember: "height"] = newValue } + get { __data["height"] } + set { __data["height"] = newValue } } public var weight: Double { - get { __data[dynamicMember: "weight"] } - set { __data[dynamicMember: "weight"] = newValue } + get { __data["weight"] } + set { __data["weight"] = newValue } } @available(*, deprecated, message: "No longer valid.") public var wingspan: GraphQLNullable { - get { __data[dynamicMember: "wingspan"] } - set { __data[dynamicMember: "wingspan"] = newValue } + get { __data["wingspan"] } + set { __data["wingspan"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetAdoptionInput.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetAdoptionInput.graphql.swift index d1570ac609..06a7b63b95 100644 --- a/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetAdoptionInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetAdoptionInput.graphql.swift @@ -29,33 +29,33 @@ public struct PetAdoptionInput: InputObject { } public var ownerID: ID { - get { __data[dynamicMember: "ownerID"] } - set { __data[dynamicMember: "ownerID"] = newValue } + get { __data["ownerID"] } + set { __data["ownerID"] = newValue } } public var petID: ID { - get { __data[dynamicMember: "petID"] } - set { __data[dynamicMember: "petID"] = newValue } + get { __data["petID"] } + set { __data["petID"] = newValue } } /// The given name the pet is called by its human. public var humanName: GraphQLNullable { - get { __data[dynamicMember: "humanName"] } - set { __data[dynamicMember: "humanName"] = newValue } + get { __data["humanName"] } + set { __data["humanName"] = newValue } } public var favoriteToy: String { - get { __data[dynamicMember: "favoriteToy"] } - set { __data[dynamicMember: "favoriteToy"] = newValue } + get { __data["favoriteToy"] } + set { __data["favoriteToy"] = newValue } } public var isSpayedOrNeutered: Bool? { - get { __data[dynamicMember: "isSpayedOrNeutered"] } - set { __data[dynamicMember: "isSpayedOrNeutered"] = newValue } + get { __data["isSpayedOrNeutered"] } + set { __data["isSpayedOrNeutered"] = newValue } } public var measurements: GraphQLNullable { - get { __data[dynamicMember: "measurements"] } - set { __data[dynamicMember: "measurements"] = newValue } + get { __data["measurements"] } + set { __data["measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetSearchFilters.graphql.swift index f2d7dad9d6..86fe0ee92f 100644 --- a/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CustomTarget/GraphQLAPI/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -23,17 +23,17 @@ public struct PetSearchFilters: InputObject { } public var species: [String] { - get { __data[dynamicMember: "species"] } - set { __data[dynamicMember: "species"] = newValue } + get { __data["species"] } + set { __data["species"] = newValue } } public var size: GraphQLNullable> { - get { __data[dynamicMember: "size"] } - set { __data[dynamicMember: "size"] = newValue } + get { __data["size"] } + set { __data["size"] = newValue } } public var measurements: GraphQLNullable { - get { __data[dynamicMember: "measurements"] } - set { __data[dynamicMember: "measurements"] = newValue } + get { __data["measurements"] } + set { __data["measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift index b673339f9f..4479e2bd3b 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift @@ -34,18 +34,18 @@ public struct MeasurementsInput: InputObject { } public var height: Double { - get { __data[dynamicMember: "height"] } - set { __data[dynamicMember: "height"] = newValue } + get { __data["height"] } + set { __data["height"] = newValue } } public var weight: Double { - get { __data[dynamicMember: "weight"] } - set { __data[dynamicMember: "weight"] = newValue } + get { __data["weight"] } + set { __data["weight"] = newValue } } @available(*, deprecated, message: "No longer valid.") public var wingspan: GraphQLNullable { - get { __data[dynamicMember: "wingspan"] } - set { __data[dynamicMember: "wingspan"] = newValue } + get { __data["wingspan"] } + set { __data["wingspan"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift index d1570ac609..06a7b63b95 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift @@ -29,33 +29,33 @@ public struct PetAdoptionInput: InputObject { } public var ownerID: ID { - get { __data[dynamicMember: "ownerID"] } - set { __data[dynamicMember: "ownerID"] = newValue } + get { __data["ownerID"] } + set { __data["ownerID"] = newValue } } public var petID: ID { - get { __data[dynamicMember: "petID"] } - set { __data[dynamicMember: "petID"] = newValue } + get { __data["petID"] } + set { __data["petID"] = newValue } } /// The given name the pet is called by its human. public var humanName: GraphQLNullable { - get { __data[dynamicMember: "humanName"] } - set { __data[dynamicMember: "humanName"] = newValue } + get { __data["humanName"] } + set { __data["humanName"] = newValue } } public var favoriteToy: String { - get { __data[dynamicMember: "favoriteToy"] } - set { __data[dynamicMember: "favoriteToy"] = newValue } + get { __data["favoriteToy"] } + set { __data["favoriteToy"] = newValue } } public var isSpayedOrNeutered: Bool? { - get { __data[dynamicMember: "isSpayedOrNeutered"] } - set { __data[dynamicMember: "isSpayedOrNeutered"] = newValue } + get { __data["isSpayedOrNeutered"] } + set { __data["isSpayedOrNeutered"] = newValue } } public var measurements: GraphQLNullable { - get { __data[dynamicMember: "measurements"] } - set { __data[dynamicMember: "measurements"] = newValue } + get { __data["measurements"] } + set { __data["measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift index f2d7dad9d6..de41e1bbc1 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -11,29 +11,36 @@ public struct PetSearchFilters: InputObject { } public init( + hash: GraphQLNullable = nil, species: [String], size: GraphQLNullable> = nil, measurements: GraphQLNullable = nil ) { __data = InputDict([ + "hash": hash, "species": species, "size": size, "measurements": measurements ]) } + public var hash: GraphQLNullable { + get { __data["hash"] } + set { __data["hash"] = newValue } + } + public var species: [String] { - get { __data[dynamicMember: "species"] } - set { __data[dynamicMember: "species"] = newValue } + get { __data["species"] } + set { __data["species"] = newValue } } public var size: GraphQLNullable> { - get { __data[dynamicMember: "size"] } - set { __data[dynamicMember: "size"] = newValue } + get { __data["size"] } + set { __data["size"] = newValue } } public var measurements: GraphQLNullable { - get { __data[dynamicMember: "measurements"] } - set { __data[dynamicMember: "measurements"] = newValue } + get { __data["measurements"] } + set { __data["measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift index b673339f9f..4479e2bd3b 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/MeasurementsInput.graphql.swift @@ -34,18 +34,18 @@ public struct MeasurementsInput: InputObject { } public var height: Double { - get { __data[dynamicMember: "height"] } - set { __data[dynamicMember: "height"] = newValue } + get { __data["height"] } + set { __data["height"] = newValue } } public var weight: Double { - get { __data[dynamicMember: "weight"] } - set { __data[dynamicMember: "weight"] = newValue } + get { __data["weight"] } + set { __data["weight"] = newValue } } @available(*, deprecated, message: "No longer valid.") public var wingspan: GraphQLNullable { - get { __data[dynamicMember: "wingspan"] } - set { __data[dynamicMember: "wingspan"] = newValue } + get { __data["wingspan"] } + set { __data["wingspan"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift index d1570ac609..06a7b63b95 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetAdoptionInput.graphql.swift @@ -29,33 +29,33 @@ public struct PetAdoptionInput: InputObject { } public var ownerID: ID { - get { __data[dynamicMember: "ownerID"] } - set { __data[dynamicMember: "ownerID"] = newValue } + get { __data["ownerID"] } + set { __data["ownerID"] = newValue } } public var petID: ID { - get { __data[dynamicMember: "petID"] } - set { __data[dynamicMember: "petID"] = newValue } + get { __data["petID"] } + set { __data["petID"] = newValue } } /// The given name the pet is called by its human. public var humanName: GraphQLNullable { - get { __data[dynamicMember: "humanName"] } - set { __data[dynamicMember: "humanName"] = newValue } + get { __data["humanName"] } + set { __data["humanName"] = newValue } } public var favoriteToy: String { - get { __data[dynamicMember: "favoriteToy"] } - set { __data[dynamicMember: "favoriteToy"] = newValue } + get { __data["favoriteToy"] } + set { __data["favoriteToy"] = newValue } } public var isSpayedOrNeutered: Bool? { - get { __data[dynamicMember: "isSpayedOrNeutered"] } - set { __data[dynamicMember: "isSpayedOrNeutered"] = newValue } + get { __data["isSpayedOrNeutered"] } + set { __data["isSpayedOrNeutered"] = newValue } } public var measurements: GraphQLNullable { - get { __data[dynamicMember: "measurements"] } - set { __data[dynamicMember: "measurements"] = newValue } + get { __data["measurements"] } + set { __data["measurements"] = newValue } } } diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift index f2d7dad9d6..de41e1bbc1 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -11,29 +11,36 @@ public struct PetSearchFilters: InputObject { } public init( + hash: GraphQLNullable = nil, species: [String], size: GraphQLNullable> = nil, measurements: GraphQLNullable = nil ) { __data = InputDict([ + "hash": hash, "species": species, "size": size, "measurements": measurements ]) } + public var hash: GraphQLNullable { + get { __data["hash"] } + set { __data["hash"] = newValue } + } + public var species: [String] { - get { __data[dynamicMember: "species"] } - set { __data[dynamicMember: "species"] = newValue } + get { __data["species"] } + set { __data["species"] = newValue } } public var size: GraphQLNullable> { - get { __data[dynamicMember: "size"] } - set { __data[dynamicMember: "size"] = newValue } + get { __data["size"] } + set { __data["size"] = newValue } } public var measurements: GraphQLNullable { - get { __data[dynamicMember: "measurements"] } - set { __data[dynamicMember: "measurements"] = newValue } + get { __data["measurements"] } + set { __data["measurements"] = newValue } } } From b250690053d8dd09566f5f5d89f94d832ad27e87 Mon Sep 17 00:00:00 2001 From: Calvin Cestari Date: Tue, 25 Oct 2022 23:23:54 -0700 Subject: [PATCH 06/11] Add conformance with conflicting name test --- Apollo.xcodeproj/project.pbxproj | 4 +++ Tests/ApolloTests/InputDictTests.swift | 49 ++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 Tests/ApolloTests/InputDictTests.swift diff --git a/Apollo.xcodeproj/project.pbxproj b/Apollo.xcodeproj/project.pbxproj index 653c95d846..1f23a6e14b 100644 --- a/Apollo.xcodeproj/project.pbxproj +++ b/Apollo.xcodeproj/project.pbxproj @@ -759,6 +759,7 @@ E68D824527A1D8A60040A46F /* ObjectTemplateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E64F7EC227A1243A0059C021 /* ObjectTemplateTests.swift */; }; E68D824727A228A80040A46F /* SchemaModuleFileGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = E68D824627A228A80040A46F /* SchemaModuleFileGenerator.swift */; }; E6908E55282694630054682B /* ApolloCodegenConfigurationCodableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6908E54282694630054682B /* ApolloCodegenConfigurationCodableTests.swift */; }; + E6936F182908FCEF0089054C /* InputDictTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6936F172908FCEE0089054C /* InputDictTests.swift */; }; E69BEDA52798B86D00000D10 /* InputObjectTemplate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E69BEDA42798B86D00000D10 /* InputObjectTemplate.swift */; }; E69BEDA72798B89600000D10 /* InputObjectTemplateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E69BEDA62798B89600000D10 /* InputObjectTemplateTests.swift */; }; E6A6866427F63AEF008A1D13 /* FileGeneratorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6A6866327F63AEF008A1D13 /* FileGeneratorTests.swift */; }; @@ -1895,6 +1896,7 @@ E687B3F328B39A9100A9551C /* Apollo-Target-CodegenCLI.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Apollo-Target-CodegenCLI.xcconfig"; sourceTree = ""; }; E68D824627A228A80040A46F /* SchemaModuleFileGenerator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SchemaModuleFileGenerator.swift; sourceTree = ""; }; E6908E54282694630054682B /* ApolloCodegenConfigurationCodableTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApolloCodegenConfigurationCodableTests.swift; sourceTree = ""; }; + E6936F172908FCEE0089054C /* InputDictTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InputDictTests.swift; sourceTree = ""; }; E699DE9428B3C20E004ECF19 /* CodegenCLITestPlan.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = CodegenCLITestPlan.xctestplan; sourceTree = ""; }; E69BEDA42798B86D00000D10 /* InputObjectTemplate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InputObjectTemplate.swift; sourceTree = ""; }; E69BEDA62798B89600000D10 /* InputObjectTemplateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InputObjectTemplateTests.swift; sourceTree = ""; }; @@ -2623,6 +2625,7 @@ 9B95EDBF22CAA0AF00702BB2 /* GETTransformerTests.swift */, 9B21FD742422C29D00998B5C /* GraphQLFileTests.swift */, 9FF90A6A1DDDEB420034C3B6 /* GraphQLMapEncodingTests.swift */, + E6936F172908FCEE0089054C /* InputDictTests.swift */, E86D8E03214B32DA0028EFE1 /* JSONTests.swift */, 9BF6C95225194EA5000D5B93 /* MultipartFormDataTests.swift */, 9F91CF8E1F6C0DB2008DD0BE /* MutatingResultsTests.swift */, @@ -5408,6 +5411,7 @@ buildActionMask = 2147483647; files = ( 5BB2C0232380836100774170 /* VersionNumberTests.swift in Sources */, + E6936F182908FCEF0089054C /* InputDictTests.swift in Sources */, DED45EC3261BA0ED0086EF63 /* WebSocketTransportTests.swift in Sources */, 9B78C71E2326E86E000C8C32 /* ErrorGenerationTests.swift in Sources */, DED45EC7261BA0ED0086EF63 /* WebSocketTests.swift in Sources */, diff --git a/Tests/ApolloTests/InputDictTests.swift b/Tests/ApolloTests/InputDictTests.swift new file mode 100644 index 0000000000..f7abc27213 --- /dev/null +++ b/Tests/ApolloTests/InputDictTests.swift @@ -0,0 +1,49 @@ +import XCTest +import ApolloAPI +import Nimble + +final class InputDictTests: XCTestCase { + + struct MockInputObject: InputObject { + var __data: InputDict + + init(_ data: InputDict) { + __data = data + } + + init(hash: GraphQLNullable = nil) { + __data = InputDict(["hash": hash]) + } + + public var hash: GraphQLNullable { + get { __data["hash"] } + set { __data["hash"] = newValue } + } + } + + func test__inputDict__shouldConformToHashable() { + // given + let subject = MockInputObject(hash: .some("MyValue")) + + // then + var hasher = Hasher() + subject.__data.hash(into: &hasher) + } + + func test__inputDict__givenPropertyNameMatchingHashableFunctionName_shouldInitializeWithPropertyName() { + // given + let subject = MockInputObject(hash: .some("MyValue")) + + // then + expect(subject.hash).to(equal(.some("MyValue"))) + } + + func test__inputDict__givenPropertyNameMatchingHashableFunctionName_shouldInitializeWithInputDict() { + // given + let subject = MockInputObject(.init(["hash": GraphQLNullable.some("MyValue")])) + + // then + expect(subject.hash).to(equal(.some("MyValue"))) + } + +} From b6bb51951b1724f76fd99de4fa83fb768901be01 Mon Sep 17 00:00:00 2001 From: Calvin Cestari Date: Wed, 26 Oct 2022 00:20:34 -0700 Subject: [PATCH 07/11] Add SelectionSet property with conflicting name --- .../AllAnimalsLocalCacheMutation.graphql.swift | 9 +++++++++ .../Operations/Queries/AllAnimalsQuery.graphql.swift | 10 ++++++++++ .../AnimalKingdomAPI/TestMocks/Bird+Mock.graphql.swift | 3 +++ .../AnimalKingdomAPI/TestMocks/Cat+Mock.graphql.swift | 3 +++ .../TestMocks/Crocodile+Mock.graphql.swift | 3 +++ .../AnimalKingdomAPI/TestMocks/Dog+Mock.graphql.swift | 3 +++ .../AnimalKingdomAPI/TestMocks/Fish+Mock.graphql.swift | 3 +++ .../TestMocks/Human+Mock.graphql.swift | 3 +++ .../AnimalKingdomAPI/TestMocks/Rat+Mock.graphql.swift | 3 +++ .../AllAnimalsLocalCacheMutation.graphql | 1 + .../animalkingdom-graphql/AllAnimalsQuery.graphql | 1 + .../animalkingdom-graphql/AnimalSchema.graphqls | 1 + 12 files changed, 43 insertions(+) diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift index 8cc42121ce..4555d0b63e 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift @@ -31,11 +31,16 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { public static var __parentType: ParentType { AnimalKingdomAPI.Interfaces.Animal } public static var __selections: [Selection] { [ + .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .inlineFragment(AsBird.self), ] } + public var hash: String? { + get { __data["hash"] } + set { __data["hash"] = newValue } + } public var species: String { get { __data["species"] } set { __data["species"] = newValue } @@ -66,6 +71,10 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { get { __data["wingspan"] } set { __data["wingspan"] = newValue } } + public var hash: String? { + get { __data["hash"] } + set { __data["hash"] = newValue } + } public var species: String { get { __data["species"] } set { __data["species"] = newValue } diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift index 78fcfd1e39..8f0f0edcd2 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift @@ -18,6 +18,7 @@ public class AllAnimalsQuery: GraphQLQuery { } ...HeightInMeters ...WarmBloodedDetails + hash species skinCovering ... on Pet { @@ -80,6 +81,7 @@ public class AllAnimalsQuery: GraphQLQuery { public static var __parentType: ParentType { AnimalKingdomAPI.Interfaces.Animal } public static var __selections: [Selection] { [ .field("height", Height.self), + .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .field("predators", [Predator].self), @@ -92,6 +94,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -185,6 +188,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -228,6 +232,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -278,6 +283,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -327,6 +333,7 @@ public class AllAnimalsQuery: GraphQLQuery { public var isJellicle: Bool { __data["isJellicle"] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -374,6 +381,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -415,6 +423,7 @@ public class AllAnimalsQuery: GraphQLQuery { public var wingspan: Double { __data["wingspan"] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -466,6 +475,7 @@ public class AllAnimalsQuery: GraphQLQuery { public var favoriteToy: String { __data["favoriteToy"] } public var birthdate: CustomDate? { __data["birthdate"] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Bird+Mock.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Bird+Mock.graphql.swift index 604fb696ab..90f3f322cd 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Bird+Mock.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Bird+Mock.graphql.swift @@ -12,6 +12,7 @@ public class Bird: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -28,6 +29,7 @@ public extension Mock where O == Bird { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -41,6 +43,7 @@ public extension Mock where O == Bird { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Cat+Mock.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Cat+Mock.graphql.swift index ed73cdd2ee..24aae20eb5 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Cat+Mock.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Cat+Mock.graphql.swift @@ -12,6 +12,7 @@ public class Cat: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -28,6 +29,7 @@ public extension Mock where O == Cat { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -41,6 +43,7 @@ public extension Mock where O == Cat { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Crocodile+Mock.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Crocodile+Mock.graphql.swift index f427c054ee..c7a8ab844b 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Crocodile+Mock.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Crocodile+Mock.graphql.swift @@ -10,6 +10,7 @@ public class Crocodile: MockObject { public typealias MockValueCollectionType = Array> public struct MockFields { + @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field<[Animal]>("predators") public var predators @@ -20,6 +21,7 @@ public class Crocodile: MockObject { public extension Mock where O == Crocodile { convenience init( + hash: String? = nil, height: Mock? = nil, id: ID? = nil, predators: [AnyMock]? = nil, @@ -27,6 +29,7 @@ public extension Mock where O == Crocodile { species: String? = nil ) { self.init() + self.hash = hash self.height = height self.id = id self.predators = predators diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Dog+Mock.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Dog+Mock.graphql.swift index 001f8a5718..aa653d1e80 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Dog+Mock.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Dog+Mock.graphql.swift @@ -13,6 +13,7 @@ public class Dog: MockObject { @Field("birthdate") public var birthdate @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -29,6 +30,7 @@ public extension Mock where O == Dog { birthdate: CustomDate? = nil, bodyTemperature: Int? = nil, favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -42,6 +44,7 @@ public extension Mock where O == Dog { self.birthdate = birthdate self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Fish+Mock.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Fish+Mock.graphql.swift index cd73c1409b..fc0cf391c5 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Fish+Mock.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Fish+Mock.graphql.swift @@ -11,6 +11,7 @@ public class Fish: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -24,6 +25,7 @@ public class Fish: MockObject { public extension Mock where O == Fish { convenience init( favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -34,6 +36,7 @@ public extension Mock where O == Fish { ) { self.init() self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Human+Mock.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Human+Mock.graphql.swift index 92f0b59250..477d2efcf1 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Human+Mock.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Human+Mock.graphql.swift @@ -12,6 +12,7 @@ public class Human: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("firstName") public var firstName + @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field("laysEggs") public var laysEggs @@ -25,6 +26,7 @@ public extension Mock where O == Human { convenience init( bodyTemperature: Int? = nil, firstName: String? = nil, + hash: String? = nil, height: Mock? = nil, id: ID? = nil, laysEggs: Bool? = nil, @@ -35,6 +37,7 @@ public extension Mock where O == Human { self.init() self.bodyTemperature = bodyTemperature self.firstName = firstName + self.hash = hash self.height = height self.id = id self.laysEggs = laysEggs diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Rat+Mock.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Rat+Mock.graphql.swift index 1d866195bc..2555e18435 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Rat+Mock.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Rat+Mock.graphql.swift @@ -11,6 +11,7 @@ public class Rat: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -24,6 +25,7 @@ public class Rat: MockObject { public extension Mock where O == Rat { convenience init( favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -34,6 +36,7 @@ public extension Mock where O == Rat { ) { self.init() self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsLocalCacheMutation.graphql b/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsLocalCacheMutation.graphql index b9dc7be5f2..7784908028 100644 --- a/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsLocalCacheMutation.graphql +++ b/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsLocalCacheMutation.graphql @@ -1,6 +1,7 @@ query AllAnimalsLocalCacheMutation @apollo_client_ios_localCacheMutation { allAnimals { + hash species skinCovering ... on Bird { diff --git a/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsQuery.graphql b/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsQuery.graphql index 56c7bbf2bc..e14cb5c3a2 100644 --- a/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsQuery.graphql +++ b/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsQuery.graphql @@ -7,6 +7,7 @@ query AllAnimalsQuery { } ...HeightInMeters ...WarmBloodedDetails + hash species skinCovering ... on Pet { diff --git a/Sources/AnimalKingdomAPI/animalkingdom-graphql/AnimalSchema.graphqls b/Sources/AnimalKingdomAPI/animalkingdom-graphql/AnimalSchema.graphqls index 1efe8f8faa..8220a4c927 100644 --- a/Sources/AnimalKingdomAPI/animalkingdom-graphql/AnimalSchema.graphqls +++ b/Sources/AnimalKingdomAPI/animalkingdom-graphql/AnimalSchema.graphqls @@ -35,6 +35,7 @@ input PetSearchFilters { interface Animal { id: ID! + hash: String species: String! height: Height! predators: [Animal!]! From d766a297b65e6cd826bc4b664058f6ba476b4554 Mon Sep 17 00:00:00 2001 From: Calvin Cestari Date: Wed, 26 Oct 2022 00:22:26 -0700 Subject: [PATCH 08/11] Remove unneeded test --- Apollo.xcodeproj/project.pbxproj | 4 --- Tests/ApolloTests/InputDictTests.swift | 49 -------------------------- 2 files changed, 53 deletions(-) delete mode 100644 Tests/ApolloTests/InputDictTests.swift diff --git a/Apollo.xcodeproj/project.pbxproj b/Apollo.xcodeproj/project.pbxproj index 1f23a6e14b..653c95d846 100644 --- a/Apollo.xcodeproj/project.pbxproj +++ b/Apollo.xcodeproj/project.pbxproj @@ -759,7 +759,6 @@ E68D824527A1D8A60040A46F /* ObjectTemplateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E64F7EC227A1243A0059C021 /* ObjectTemplateTests.swift */; }; E68D824727A228A80040A46F /* SchemaModuleFileGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = E68D824627A228A80040A46F /* SchemaModuleFileGenerator.swift */; }; E6908E55282694630054682B /* ApolloCodegenConfigurationCodableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6908E54282694630054682B /* ApolloCodegenConfigurationCodableTests.swift */; }; - E6936F182908FCEF0089054C /* InputDictTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6936F172908FCEE0089054C /* InputDictTests.swift */; }; E69BEDA52798B86D00000D10 /* InputObjectTemplate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E69BEDA42798B86D00000D10 /* InputObjectTemplate.swift */; }; E69BEDA72798B89600000D10 /* InputObjectTemplateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E69BEDA62798B89600000D10 /* InputObjectTemplateTests.swift */; }; E6A6866427F63AEF008A1D13 /* FileGeneratorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6A6866327F63AEF008A1D13 /* FileGeneratorTests.swift */; }; @@ -1896,7 +1895,6 @@ E687B3F328B39A9100A9551C /* Apollo-Target-CodegenCLI.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Apollo-Target-CodegenCLI.xcconfig"; sourceTree = ""; }; E68D824627A228A80040A46F /* SchemaModuleFileGenerator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SchemaModuleFileGenerator.swift; sourceTree = ""; }; E6908E54282694630054682B /* ApolloCodegenConfigurationCodableTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApolloCodegenConfigurationCodableTests.swift; sourceTree = ""; }; - E6936F172908FCEE0089054C /* InputDictTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InputDictTests.swift; sourceTree = ""; }; E699DE9428B3C20E004ECF19 /* CodegenCLITestPlan.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = CodegenCLITestPlan.xctestplan; sourceTree = ""; }; E69BEDA42798B86D00000D10 /* InputObjectTemplate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InputObjectTemplate.swift; sourceTree = ""; }; E69BEDA62798B89600000D10 /* InputObjectTemplateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InputObjectTemplateTests.swift; sourceTree = ""; }; @@ -2625,7 +2623,6 @@ 9B95EDBF22CAA0AF00702BB2 /* GETTransformerTests.swift */, 9B21FD742422C29D00998B5C /* GraphQLFileTests.swift */, 9FF90A6A1DDDEB420034C3B6 /* GraphQLMapEncodingTests.swift */, - E6936F172908FCEE0089054C /* InputDictTests.swift */, E86D8E03214B32DA0028EFE1 /* JSONTests.swift */, 9BF6C95225194EA5000D5B93 /* MultipartFormDataTests.swift */, 9F91CF8E1F6C0DB2008DD0BE /* MutatingResultsTests.swift */, @@ -5411,7 +5408,6 @@ buildActionMask = 2147483647; files = ( 5BB2C0232380836100774170 /* VersionNumberTests.swift in Sources */, - E6936F182908FCEF0089054C /* InputDictTests.swift in Sources */, DED45EC3261BA0ED0086EF63 /* WebSocketTransportTests.swift in Sources */, 9B78C71E2326E86E000C8C32 /* ErrorGenerationTests.swift in Sources */, DED45EC7261BA0ED0086EF63 /* WebSocketTests.swift in Sources */, diff --git a/Tests/ApolloTests/InputDictTests.swift b/Tests/ApolloTests/InputDictTests.swift deleted file mode 100644 index f7abc27213..0000000000 --- a/Tests/ApolloTests/InputDictTests.swift +++ /dev/null @@ -1,49 +0,0 @@ -import XCTest -import ApolloAPI -import Nimble - -final class InputDictTests: XCTestCase { - - struct MockInputObject: InputObject { - var __data: InputDict - - init(_ data: InputDict) { - __data = data - } - - init(hash: GraphQLNullable = nil) { - __data = InputDict(["hash": hash]) - } - - public var hash: GraphQLNullable { - get { __data["hash"] } - set { __data["hash"] = newValue } - } - } - - func test__inputDict__shouldConformToHashable() { - // given - let subject = MockInputObject(hash: .some("MyValue")) - - // then - var hasher = Hasher() - subject.__data.hash(into: &hasher) - } - - func test__inputDict__givenPropertyNameMatchingHashableFunctionName_shouldInitializeWithPropertyName() { - // given - let subject = MockInputObject(hash: .some("MyValue")) - - // then - expect(subject.hash).to(equal(.some("MyValue"))) - } - - func test__inputDict__givenPropertyNameMatchingHashableFunctionName_shouldInitializeWithInputDict() { - // given - let subject = MockInputObject(.init(["hash": GraphQLNullable.some("MyValue")])) - - // then - expect(subject.hash).to(equal(.some("MyValue"))) - } - -} From bffb7eac0ee668fef335b0aa47f85dff4d6581ce Mon Sep 17 00:00:00 2001 From: Calvin Cestari Date: Wed, 26 Oct 2022 00:37:40 -0700 Subject: [PATCH 09/11] Fix failing IR tests --- .../AnimalKingdomIRCreationTests.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Tests/ApolloCodegenTests/AnimalKingdomAPI/AnimalKingdomIRCreationTests.swift b/Tests/ApolloCodegenTests/AnimalKingdomAPI/AnimalKingdomIRCreationTests.swift index e48689c663..4ac052b80a 100644 --- a/Tests/ApolloCodegenTests/AnimalKingdomAPI/AnimalKingdomIRCreationTests.swift +++ b/Tests/ApolloCodegenTests/AnimalKingdomAPI/AnimalKingdomIRCreationTests.swift @@ -105,6 +105,8 @@ final class AnimalKingdomIRCreationTests: XCTestCase { fields: [ .mock("height", type: .nonNull(.entity(GraphQLObjectType.mock("Height")))), + .mock("hash", + type: .scalar(GraphQLScalarType.string())), .mock("species", type: .nonNull(.scalar(GraphQLScalarType.string()))), .mock("skinCovering", @@ -355,6 +357,8 @@ final class AnimalKingdomIRCreationTests: XCTestCase { fields: [ .mock("height", type: .nonNull(.entity(GraphQLObjectType.mock("Height")))), + .mock("hash", + type: .scalar(GraphQLScalarType.string())), .mock("species", type: .nonNull(.scalar(GraphQLScalarType.string()))), .mock("skinCovering", @@ -470,6 +474,8 @@ final class AnimalKingdomIRCreationTests: XCTestCase { expected = ( fields: [ + .mock("hash", + type: .scalar(GraphQLScalarType.string())), .mock("species", type: .nonNull(.scalar(GraphQLScalarType.string()))), .mock("skinCovering", @@ -598,6 +604,8 @@ final class AnimalKingdomIRCreationTests: XCTestCase { fields: [ .mock("height", type: .nonNull(.entity(GraphQLObjectType.mock("Height")))), + .mock("hash", + type: .scalar(GraphQLScalarType.string())), .mock("species", type: .nonNull(.scalar(GraphQLScalarType.string()))), .mock("skinCovering", @@ -722,6 +730,8 @@ final class AnimalKingdomIRCreationTests: XCTestCase { fields: [ .mock("height", type: .nonNull(.entity(GraphQLObjectType.mock("Height")))), + .mock("hash", + type: .scalar(GraphQLScalarType.string())), .mock("species", type: .nonNull(.scalar(GraphQLScalarType.string()))), .mock("skinCovering", @@ -846,6 +856,8 @@ final class AnimalKingdomIRCreationTests: XCTestCase { fields: [ .mock("height", type: .nonNull(.entity(GraphQLObjectType.mock("Height")))), + .mock("hash", + type: .scalar(GraphQLScalarType.string())), .mock("species", type: .nonNull(.scalar(GraphQLScalarType.string()))), .mock("skinCovering", @@ -909,6 +921,8 @@ final class AnimalKingdomIRCreationTests: XCTestCase { fields: [ .mock("height", type: .nonNull(.entity(GraphQLObjectType.mock("Height")))), + .mock("hash", + type: .scalar(GraphQLScalarType.string())), .mock("species", type: .nonNull(.scalar(GraphQLScalarType.string()))), .mock("skinCovering", From b678124ed08b74503b8dfa7169a8ee92fb809d23 Mon Sep 17 00:00:00 2001 From: Calvin Cestari Date: Wed, 26 Oct 2022 00:46:23 -0700 Subject: [PATCH 10/11] Update internal codegen test projects --- .../AllAnimalsLocalCacheMutation.graphql.swift | 9 +++++++++ .../Operations/Queries/AllAnimalsQuery.graphql.swift | 10 ++++++++++ .../TestMocks/Bird+Mock.graphql.swift | 3 +++ .../TestMocks/Cat+Mock.graphql.swift | 3 +++ .../TestMocks/Crocodile+Mock.graphql.swift | 3 +++ .../TestMocks/Dog+Mock.graphql.swift | 3 +++ .../TestMocks/Fish+Mock.graphql.swift | 3 +++ .../TestMocks/Human+Mock.graphql.swift | 3 +++ .../TestMocks/Rat+Mock.graphql.swift | 3 +++ .../AllAnimalsLocalCacheMutation.graphql.swift | 9 +++++++++ .../Operations/Queries/AllAnimalsQuery.graphql.swift | 10 ++++++++++ .../TestMocks/Bird+Mock.graphql.swift | 3 +++ .../TestMocks/Cat+Mock.graphql.swift | 3 +++ .../TestMocks/Crocodile+Mock.graphql.swift | 3 +++ .../TestMocks/Dog+Mock.graphql.swift | 3 +++ .../TestMocks/Fish+Mock.graphql.swift | 3 +++ .../TestMocks/Human+Mock.graphql.swift | 3 +++ .../TestMocks/Rat+Mock.graphql.swift | 3 +++ .../AllAnimalsLocalCacheMutation.graphql.swift | 9 +++++++++ .../Operations/Queries/AllAnimalsQuery.graphql.swift | 10 ++++++++++ .../TestMocks/Bird+Mock.graphql.swift | 3 +++ .../SPMInXcodeProject/TestMocks/Cat+Mock.graphql.swift | 3 +++ .../TestMocks/Crocodile+Mock.graphql.swift | 3 +++ .../SPMInXcodeProject/TestMocks/Dog+Mock.graphql.swift | 3 +++ .../TestMocks/Fish+Mock.graphql.swift | 3 +++ .../TestMocks/Human+Mock.graphql.swift | 3 +++ .../SPMInXcodeProject/TestMocks/Rat+Mock.graphql.swift | 3 +++ .../AllAnimalsLocalCacheMutation.graphql.swift | 9 +++++++++ .../Operations/Queries/AllAnimalsQuery.graphql.swift | 10 ++++++++++ .../TestMocks/Bird+Mock.graphql.swift | 3 +++ .../TestMocks/Cat+Mock.graphql.swift | 3 +++ .../TestMocks/Crocodile+Mock.graphql.swift | 3 +++ .../TestMocks/Dog+Mock.graphql.swift | 3 +++ .../TestMocks/Fish+Mock.graphql.swift | 3 +++ .../TestMocks/Human+Mock.graphql.swift | 3 +++ .../TestMocks/Rat+Mock.graphql.swift | 3 +++ 36 files changed, 160 insertions(+) diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift index 407230e51a..91c85295d2 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift @@ -32,11 +32,16 @@ public extension MyGraphQLSchema { public static var __parentType: ParentType { MyGraphQLSchema.Interfaces.Animal } public static var __selections: [Selection] { [ + .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .inlineFragment(AsBird.self), ] } + public var hash: String? { + get { __data["hash"] } + set { __data["hash"] = newValue } + } public var species: String { get { __data["species"] } set { __data["species"] = newValue } @@ -67,6 +72,10 @@ public extension MyGraphQLSchema { get { __data["wingspan"] } set { __data["wingspan"] = newValue } } + public var hash: String? { + get { __data["hash"] } + set { __data["hash"] = newValue } + } public var species: String { get { __data["species"] } set { __data["species"] = newValue } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Operations/Queries/AllAnimalsQuery.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Operations/Queries/AllAnimalsQuery.graphql.swift index ccdf19143b..81ed86fcee 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Operations/Queries/AllAnimalsQuery.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Operations/Queries/AllAnimalsQuery.graphql.swift @@ -19,6 +19,7 @@ public extension MyGraphQLSchema { } ...HeightInMeters ...WarmBloodedDetails + hash species skinCovering ... on Pet { @@ -88,6 +89,7 @@ public extension MyGraphQLSchema { public static var __parentType: ParentType { MyGraphQLSchema.Interfaces.Animal } public static var __selections: [Selection] { [ .field("height", Height.self), + .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .field("predators", [Predator].self), @@ -100,6 +102,7 @@ public extension MyGraphQLSchema { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -193,6 +196,7 @@ public extension MyGraphQLSchema { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -236,6 +240,7 @@ public extension MyGraphQLSchema { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -286,6 +291,7 @@ public extension MyGraphQLSchema { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -335,6 +341,7 @@ public extension MyGraphQLSchema { public var isJellicle: Bool { __data["isJellicle"] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -382,6 +389,7 @@ public extension MyGraphQLSchema { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -423,6 +431,7 @@ public extension MyGraphQLSchema { public var wingspan: Double { __data["wingspan"] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -474,6 +483,7 @@ public extension MyGraphQLSchema { public var favoriteToy: String { __data["favoriteToy"] } public var birthdate: CustomDate? { __data["birthdate"] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Bird+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Bird+Mock.graphql.swift index 639da23a20..8a9e49c555 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Bird+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Bird+Mock.graphql.swift @@ -12,6 +12,7 @@ public class Bird: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -28,6 +29,7 @@ public extension Mock where O == Bird { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: MyGraphQLSchema.ID? = nil, @@ -41,6 +43,7 @@ public extension Mock where O == Bird { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Cat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Cat+Mock.graphql.swift index 0a6f3d0e8f..caccc38a57 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Cat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Cat+Mock.graphql.swift @@ -12,6 +12,7 @@ public class Cat: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -28,6 +29,7 @@ public extension Mock where O == Cat { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: MyGraphQLSchema.ID? = nil, @@ -41,6 +43,7 @@ public extension Mock where O == Cat { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Crocodile+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Crocodile+Mock.graphql.swift index 02a196f9ad..c7205cf3a8 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Crocodile+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Crocodile+Mock.graphql.swift @@ -10,6 +10,7 @@ public class Crocodile: MockObject { public typealias MockValueCollectionType = Array> public struct MockFields { + @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field<[Animal]>("predators") public var predators @@ -20,6 +21,7 @@ public class Crocodile: MockObject { public extension Mock where O == Crocodile { convenience init( + hash: String? = nil, height: Mock? = nil, id: MyGraphQLSchema.ID? = nil, predators: [AnyMock]? = nil, @@ -27,6 +29,7 @@ public extension Mock where O == Crocodile { species: String? = nil ) { self.init() + self.hash = hash self.height = height self.id = id self.predators = predators diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Dog+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Dog+Mock.graphql.swift index 0b772d066f..1b65c2ef63 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Dog+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Dog+Mock.graphql.swift @@ -13,6 +13,7 @@ public class Dog: MockObject { @Field("birthdate") public var birthdate @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -29,6 +30,7 @@ public extension Mock where O == Dog { birthdate: MyGraphQLSchema.CustomDate? = nil, bodyTemperature: Int? = nil, favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: MyGraphQLSchema.ID? = nil, @@ -42,6 +44,7 @@ public extension Mock where O == Dog { self.birthdate = birthdate self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Fish+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Fish+Mock.graphql.swift index 4128aa3492..f41762bdf2 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Fish+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Fish+Mock.graphql.swift @@ -11,6 +11,7 @@ public class Fish: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -24,6 +25,7 @@ public class Fish: MockObject { public extension Mock where O == Fish { convenience init( favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: MyGraphQLSchema.ID? = nil, @@ -34,6 +36,7 @@ public extension Mock where O == Fish { ) { self.init() self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Human+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Human+Mock.graphql.swift index 973133c212..8a54daeadc 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Human+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Human+Mock.graphql.swift @@ -12,6 +12,7 @@ public class Human: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("firstName") public var firstName + @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field("laysEggs") public var laysEggs @@ -25,6 +26,7 @@ public extension Mock where O == Human { convenience init( bodyTemperature: Int? = nil, firstName: String? = nil, + hash: String? = nil, height: Mock? = nil, id: MyGraphQLSchema.ID? = nil, laysEggs: Bool? = nil, @@ -35,6 +37,7 @@ public extension Mock where O == Human { self.init() self.bodyTemperature = bodyTemperature self.firstName = firstName + self.hash = hash self.height = height self.id = id self.laysEggs = laysEggs diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Rat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Rat+Mock.graphql.swift index 09a9748070..47f43401b5 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Rat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Rat+Mock.graphql.swift @@ -11,6 +11,7 @@ public class Rat: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -24,6 +25,7 @@ public class Rat: MockObject { public extension Mock where O == Rat { convenience init( favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: MyGraphQLSchema.ID? = nil, @@ -34,6 +36,7 @@ public extension Mock where O == Rat { ) { self.init() self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift index c78ce3d324..187c15ed73 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift @@ -31,11 +31,16 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { public static var __parentType: ParentType { MyCustomProject.Interfaces.Animal } public static var __selections: [Selection] { [ + .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .inlineFragment(AsBird.self), ] } + public var hash: String? { + get { __data["hash"] } + set { __data["hash"] = newValue } + } public var species: String { get { __data["species"] } set { __data["species"] = newValue } @@ -66,6 +71,10 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { get { __data["wingspan"] } set { __data["wingspan"] = newValue } } + public var hash: String? { + get { __data["hash"] } + set { __data["hash"] = newValue } + } public var species: String { get { __data["species"] } set { __data["species"] = newValue } diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Operations/Queries/AllAnimalsQuery.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Operations/Queries/AllAnimalsQuery.graphql.swift index 706f14bbc3..887d024774 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Operations/Queries/AllAnimalsQuery.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Operations/Queries/AllAnimalsQuery.graphql.swift @@ -18,6 +18,7 @@ public class AllAnimalsQuery: GraphQLQuery { } ...HeightInMeters ...WarmBloodedDetails + hash species skinCovering ... on Pet { @@ -80,6 +81,7 @@ public class AllAnimalsQuery: GraphQLQuery { public static var __parentType: ParentType { MyCustomProject.Interfaces.Animal } public static var __selections: [Selection] { [ .field("height", Height.self), + .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .field("predators", [Predator].self), @@ -92,6 +94,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -185,6 +188,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -228,6 +232,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -278,6 +283,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -327,6 +333,7 @@ public class AllAnimalsQuery: GraphQLQuery { public var isJellicle: Bool { __data["isJellicle"] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -374,6 +381,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -415,6 +423,7 @@ public class AllAnimalsQuery: GraphQLQuery { public var wingspan: Double { __data["wingspan"] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -466,6 +475,7 @@ public class AllAnimalsQuery: GraphQLQuery { public var favoriteToy: String { __data["favoriteToy"] } public var birthdate: CustomDate? { __data["birthdate"] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Bird+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Bird+Mock.graphql.swift index ae72a2a853..58823f6070 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Bird+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Bird+Mock.graphql.swift @@ -12,6 +12,7 @@ public class Bird: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -28,6 +29,7 @@ public extension Mock where O == Bird { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -41,6 +43,7 @@ public extension Mock where O == Bird { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Cat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Cat+Mock.graphql.swift index 85e4ee3cd7..a7bc40e81e 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Cat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Cat+Mock.graphql.swift @@ -12,6 +12,7 @@ public class Cat: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -28,6 +29,7 @@ public extension Mock where O == Cat { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -41,6 +43,7 @@ public extension Mock where O == Cat { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Crocodile+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Crocodile+Mock.graphql.swift index 761175e46f..53d07509fb 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Crocodile+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Crocodile+Mock.graphql.swift @@ -10,6 +10,7 @@ public class Crocodile: MockObject { public typealias MockValueCollectionType = Array> public struct MockFields { + @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field<[Animal]>("predators") public var predators @@ -20,6 +21,7 @@ public class Crocodile: MockObject { public extension Mock where O == Crocodile { convenience init( + hash: String? = nil, height: Mock? = nil, id: ID? = nil, predators: [AnyMock]? = nil, @@ -27,6 +29,7 @@ public extension Mock where O == Crocodile { species: String? = nil ) { self.init() + self.hash = hash self.height = height self.id = id self.predators = predators diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Dog+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Dog+Mock.graphql.swift index 0375238ba1..23fa81a0a7 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Dog+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Dog+Mock.graphql.swift @@ -13,6 +13,7 @@ public class Dog: MockObject { @Field("birthdate") public var birthdate @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -29,6 +30,7 @@ public extension Mock where O == Dog { birthdate: CustomDate? = nil, bodyTemperature: Int? = nil, favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -42,6 +44,7 @@ public extension Mock where O == Dog { self.birthdate = birthdate self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Fish+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Fish+Mock.graphql.swift index fabfdb63dd..456d5d3027 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Fish+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Fish+Mock.graphql.swift @@ -11,6 +11,7 @@ public class Fish: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -24,6 +25,7 @@ public class Fish: MockObject { public extension Mock where O == Fish { convenience init( favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -34,6 +36,7 @@ public extension Mock where O == Fish { ) { self.init() self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Human+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Human+Mock.graphql.swift index 1574a0af8f..21af33afd5 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Human+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Human+Mock.graphql.swift @@ -12,6 +12,7 @@ public class Human: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("firstName") public var firstName + @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field("laysEggs") public var laysEggs @@ -25,6 +26,7 @@ public extension Mock where O == Human { convenience init( bodyTemperature: Int? = nil, firstName: String? = nil, + hash: String? = nil, height: Mock? = nil, id: ID? = nil, laysEggs: Bool? = nil, @@ -35,6 +37,7 @@ public extension Mock where O == Human { self.init() self.bodyTemperature = bodyTemperature self.firstName = firstName + self.hash = hash self.height = height self.id = id self.laysEggs = laysEggs diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Rat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Rat+Mock.graphql.swift index 97ffd63df5..efaa55dda9 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Rat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Rat+Mock.graphql.swift @@ -11,6 +11,7 @@ public class Rat: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -24,6 +25,7 @@ public class Rat: MockObject { public extension Mock where O == Rat { convenience init( favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -34,6 +36,7 @@ public extension Mock where O == Rat { ) { self.init() self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift index 8cc42121ce..4555d0b63e 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift @@ -31,11 +31,16 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { public static var __parentType: ParentType { AnimalKingdomAPI.Interfaces.Animal } public static var __selections: [Selection] { [ + .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .inlineFragment(AsBird.self), ] } + public var hash: String? { + get { __data["hash"] } + set { __data["hash"] = newValue } + } public var species: String { get { __data["species"] } set { __data["species"] = newValue } @@ -66,6 +71,10 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { get { __data["wingspan"] } set { __data["wingspan"] = newValue } } + public var hash: String? { + get { __data["hash"] } + set { __data["hash"] = newValue } + } public var species: String { get { __data["species"] } set { __data["species"] = newValue } diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift index 73216f6b36..fc0795f508 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift @@ -18,6 +18,7 @@ public class AllAnimalsQuery: GraphQLQuery { } ...HeightInMeters ...WarmBloodedDetails + hash species skinCovering ... on Pet { @@ -87,6 +88,7 @@ public class AllAnimalsQuery: GraphQLQuery { public static var __parentType: ParentType { AnimalKingdomAPI.Interfaces.Animal } public static var __selections: [Selection] { [ .field("height", Height.self), + .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .field("predators", [Predator].self), @@ -99,6 +101,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -192,6 +195,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -235,6 +239,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -285,6 +290,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -334,6 +340,7 @@ public class AllAnimalsQuery: GraphQLQuery { public var isJellicle: Bool { __data["isJellicle"] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -381,6 +388,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -422,6 +430,7 @@ public class AllAnimalsQuery: GraphQLQuery { public var wingspan: Double { __data["wingspan"] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -473,6 +482,7 @@ public class AllAnimalsQuery: GraphQLQuery { public var favoriteToy: String { __data["favoriteToy"] } public var birthdate: CustomDate? { __data["birthdate"] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Bird+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Bird+Mock.graphql.swift index 604fb696ab..90f3f322cd 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Bird+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Bird+Mock.graphql.swift @@ -12,6 +12,7 @@ public class Bird: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -28,6 +29,7 @@ public extension Mock where O == Bird { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -41,6 +43,7 @@ public extension Mock where O == Bird { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Cat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Cat+Mock.graphql.swift index ed73cdd2ee..24aae20eb5 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Cat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Cat+Mock.graphql.swift @@ -12,6 +12,7 @@ public class Cat: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -28,6 +29,7 @@ public extension Mock where O == Cat { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -41,6 +43,7 @@ public extension Mock where O == Cat { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Crocodile+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Crocodile+Mock.graphql.swift index f427c054ee..c7a8ab844b 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Crocodile+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Crocodile+Mock.graphql.swift @@ -10,6 +10,7 @@ public class Crocodile: MockObject { public typealias MockValueCollectionType = Array> public struct MockFields { + @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field<[Animal]>("predators") public var predators @@ -20,6 +21,7 @@ public class Crocodile: MockObject { public extension Mock where O == Crocodile { convenience init( + hash: String? = nil, height: Mock? = nil, id: ID? = nil, predators: [AnyMock]? = nil, @@ -27,6 +29,7 @@ public extension Mock where O == Crocodile { species: String? = nil ) { self.init() + self.hash = hash self.height = height self.id = id self.predators = predators diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Dog+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Dog+Mock.graphql.swift index 001f8a5718..aa653d1e80 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Dog+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Dog+Mock.graphql.swift @@ -13,6 +13,7 @@ public class Dog: MockObject { @Field("birthdate") public var birthdate @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -29,6 +30,7 @@ public extension Mock where O == Dog { birthdate: CustomDate? = nil, bodyTemperature: Int? = nil, favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -42,6 +44,7 @@ public extension Mock where O == Dog { self.birthdate = birthdate self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Fish+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Fish+Mock.graphql.swift index cd73c1409b..fc0cf391c5 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Fish+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Fish+Mock.graphql.swift @@ -11,6 +11,7 @@ public class Fish: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -24,6 +25,7 @@ public class Fish: MockObject { public extension Mock where O == Fish { convenience init( favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -34,6 +36,7 @@ public extension Mock where O == Fish { ) { self.init() self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Human+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Human+Mock.graphql.swift index 92f0b59250..477d2efcf1 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Human+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Human+Mock.graphql.swift @@ -12,6 +12,7 @@ public class Human: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("firstName") public var firstName + @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field("laysEggs") public var laysEggs @@ -25,6 +26,7 @@ public extension Mock where O == Human { convenience init( bodyTemperature: Int? = nil, firstName: String? = nil, + hash: String? = nil, height: Mock? = nil, id: ID? = nil, laysEggs: Bool? = nil, @@ -35,6 +37,7 @@ public extension Mock where O == Human { self.init() self.bodyTemperature = bodyTemperature self.firstName = firstName + self.hash = hash self.height = height self.id = id self.laysEggs = laysEggs diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Rat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Rat+Mock.graphql.swift index 1d866195bc..2555e18435 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Rat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Rat+Mock.graphql.swift @@ -11,6 +11,7 @@ public class Rat: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -24,6 +25,7 @@ public class Rat: MockObject { public extension Mock where O == Rat { convenience init( favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -34,6 +36,7 @@ public extension Mock where O == Rat { ) { self.init() self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift index 50745e9e95..a327906551 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift @@ -31,11 +31,16 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { public static var __parentType: ParentType { GraphQLSchemaName.Interfaces.Animal } public static var __selections: [Selection] { [ + .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .inlineFragment(AsBird.self), ] } + public var hash: String? { + get { __data["hash"] } + set { __data["hash"] = newValue } + } public var species: String { get { __data["species"] } set { __data["species"] = newValue } @@ -66,6 +71,10 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { get { __data["wingspan"] } set { __data["wingspan"] = newValue } } + public var hash: String? { + get { __data["hash"] } + set { __data["hash"] = newValue } + } public var species: String { get { __data["species"] } set { __data["species"] = newValue } diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift index d841878103..f8159d52eb 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift @@ -18,6 +18,7 @@ public class AllAnimalsQuery: GraphQLQuery { } ...HeightInMeters ...WarmBloodedDetails + hash species skinCovering ... on Pet { @@ -87,6 +88,7 @@ public class AllAnimalsQuery: GraphQLQuery { public static var __parentType: ParentType { GraphQLSchemaName.Interfaces.Animal } public static var __selections: [Selection] { [ .field("height", Height.self), + .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .field("predators", [Predator].self), @@ -99,6 +101,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -192,6 +195,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -235,6 +239,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -285,6 +290,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -334,6 +340,7 @@ public class AllAnimalsQuery: GraphQLQuery { public var isJellicle: Bool { __data["isJellicle"] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -381,6 +388,7 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -422,6 +430,7 @@ public class AllAnimalsQuery: GraphQLQuery { public var wingspan: Double { __data["wingspan"] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -473,6 +482,7 @@ public class AllAnimalsQuery: GraphQLQuery { public var favoriteToy: String { __data["favoriteToy"] } public var birthdate: CustomDate? { __data["birthdate"] } public var height: Height { __data["height"] } + public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Bird+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Bird+Mock.graphql.swift index 23ea7a29ac..58bb4b5bd4 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Bird+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Bird+Mock.graphql.swift @@ -12,6 +12,7 @@ public class Bird: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -28,6 +29,7 @@ public extension Mock where O == Bird { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -41,6 +43,7 @@ public extension Mock where O == Bird { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Cat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Cat+Mock.graphql.swift index 417795d601..472243f920 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Cat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Cat+Mock.graphql.swift @@ -12,6 +12,7 @@ public class Cat: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -28,6 +29,7 @@ public extension Mock where O == Cat { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -41,6 +43,7 @@ public extension Mock where O == Cat { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Crocodile+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Crocodile+Mock.graphql.swift index 8cf1926e20..ca8668d098 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Crocodile+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Crocodile+Mock.graphql.swift @@ -10,6 +10,7 @@ public class Crocodile: MockObject { public typealias MockValueCollectionType = Array> public struct MockFields { + @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field<[Animal]>("predators") public var predators @@ -20,6 +21,7 @@ public class Crocodile: MockObject { public extension Mock where O == Crocodile { convenience init( + hash: String? = nil, height: Mock? = nil, id: ID? = nil, predators: [AnyMock]? = nil, @@ -27,6 +29,7 @@ public extension Mock where O == Crocodile { species: String? = nil ) { self.init() + self.hash = hash self.height = height self.id = id self.predators = predators diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Dog+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Dog+Mock.graphql.swift index 8b1900cf54..f840e01b77 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Dog+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Dog+Mock.graphql.swift @@ -13,6 +13,7 @@ public class Dog: MockObject { @Field("birthdate") public var birthdate @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -29,6 +30,7 @@ public extension Mock where O == Dog { birthdate: CustomDate? = nil, bodyTemperature: Int? = nil, favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -42,6 +44,7 @@ public extension Mock where O == Dog { self.birthdate = birthdate self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Fish+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Fish+Mock.graphql.swift index d34dbeac4d..9ea68f8266 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Fish+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Fish+Mock.graphql.swift @@ -11,6 +11,7 @@ public class Fish: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -24,6 +25,7 @@ public class Fish: MockObject { public extension Mock where O == Fish { convenience init( favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -34,6 +36,7 @@ public extension Mock where O == Fish { ) { self.init() self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Human+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Human+Mock.graphql.swift index 1e8f1c4ca5..bb4e9cd7f2 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Human+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Human+Mock.graphql.swift @@ -12,6 +12,7 @@ public class Human: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("firstName") public var firstName + @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field("laysEggs") public var laysEggs @@ -25,6 +26,7 @@ public extension Mock where O == Human { convenience init( bodyTemperature: Int? = nil, firstName: String? = nil, + hash: String? = nil, height: Mock? = nil, id: ID? = nil, laysEggs: Bool? = nil, @@ -35,6 +37,7 @@ public extension Mock where O == Human { self.init() self.bodyTemperature = bodyTemperature self.firstName = firstName + self.hash = hash self.height = height self.id = id self.laysEggs = laysEggs diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Rat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Rat+Mock.graphql.swift index 02e6bea53d..396b320728 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Rat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Rat+Mock.graphql.swift @@ -11,6 +11,7 @@ public class Rat: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy + @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -24,6 +25,7 @@ public class Rat: MockObject { public extension Mock where O == Rat { convenience init( favoriteToy: String? = nil, + hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -34,6 +36,7 @@ public extension Mock where O == Rat { ) { self.init() self.favoriteToy = favoriteToy + self.hash = hash self.height = height self.humanName = humanName self.id = id From ed7be0470b26c5215254c97df83fa91c8e722952 Mon Sep 17 00:00:00 2001 From: Calvin Cestari Date: Wed, 26 Oct 2022 11:38:02 -0700 Subject: [PATCH 11/11] Remove `hash` named property from generated code sample --- .../AllAnimalsLocalCacheMutation.graphql.swift | 9 --------- .../Queries/AllAnimalsQuery.graphql.swift | 10 ---------- .../InputObjects/PetSearchFilters.graphql.swift | 7 ------- .../TestMocks/Bird+Mock.graphql.swift | 3 --- .../TestMocks/Cat+Mock.graphql.swift | 3 --- .../TestMocks/Crocodile+Mock.graphql.swift | 3 --- .../TestMocks/Dog+Mock.graphql.swift | 3 --- .../TestMocks/Fish+Mock.graphql.swift | 3 --- .../TestMocks/Human+Mock.graphql.swift | 3 --- .../TestMocks/Rat+Mock.graphql.swift | 3 --- .../AllAnimalsLocalCacheMutation.graphql | 1 - .../animalkingdom-graphql/AllAnimalsQuery.graphql | 1 - .../animalkingdom-graphql/AnimalSchema.graphqls | 2 -- .../AnimalKingdomIRCreationTests.swift | 14 -------------- .../AllAnimalsLocalCacheMutation.graphql.swift | 9 --------- .../Queries/AllAnimalsQuery.graphql.swift | 10 ---------- .../InputObjects/PetSearchFilters.graphql.swift | 7 ------- .../TestMocks/Bird+Mock.graphql.swift | 3 --- .../TestMocks/Cat+Mock.graphql.swift | 3 --- .../TestMocks/Crocodile+Mock.graphql.swift | 3 --- .../TestMocks/Dog+Mock.graphql.swift | 3 --- .../TestMocks/Fish+Mock.graphql.swift | 3 --- .../TestMocks/Human+Mock.graphql.swift | 3 --- .../TestMocks/Rat+Mock.graphql.swift | 3 --- .../AllAnimalsLocalCacheMutation.graphql.swift | 9 --------- .../Queries/AllAnimalsQuery.graphql.swift | 10 ---------- .../InputObjects/PetSearchFilters.graphql.swift | 7 ------- .../TestMocks/Bird+Mock.graphql.swift | 3 --- .../TestMocks/Cat+Mock.graphql.swift | 3 --- .../TestMocks/Crocodile+Mock.graphql.swift | 3 --- .../TestMocks/Dog+Mock.graphql.swift | 3 --- .../TestMocks/Fish+Mock.graphql.swift | 3 --- .../TestMocks/Human+Mock.graphql.swift | 3 --- .../TestMocks/Rat+Mock.graphql.swift | 3 --- .../AllAnimalsLocalCacheMutation.graphql.swift | 9 --------- .../Queries/AllAnimalsQuery.graphql.swift | 10 ---------- .../InputObjects/PetSearchFilters.graphql.swift | 7 ------- .../TestMocks/Bird+Mock.graphql.swift | 3 --- .../TestMocks/Cat+Mock.graphql.swift | 3 --- .../TestMocks/Crocodile+Mock.graphql.swift | 3 --- .../TestMocks/Dog+Mock.graphql.swift | 3 --- .../TestMocks/Fish+Mock.graphql.swift | 3 --- .../TestMocks/Human+Mock.graphql.swift | 3 --- .../TestMocks/Rat+Mock.graphql.swift | 3 --- .../AllAnimalsLocalCacheMutation.graphql.swift | 9 --------- .../Queries/AllAnimalsQuery.graphql.swift | 10 ---------- .../InputObjects/PetSearchFilters.graphql.swift | 7 ------- .../TestMocks/Bird+Mock.graphql.swift | 3 --- .../TestMocks/Cat+Mock.graphql.swift | 3 --- .../TestMocks/Crocodile+Mock.graphql.swift | 3 --- .../TestMocks/Dog+Mock.graphql.swift | 3 --- .../TestMocks/Fish+Mock.graphql.swift | 3 --- .../TestMocks/Human+Mock.graphql.swift | 3 --- .../TestMocks/Rat+Mock.graphql.swift | 3 --- 54 files changed, 253 deletions(-) diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift index 4555d0b63e..8cc42121ce 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift @@ -31,16 +31,11 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { public static var __parentType: ParentType { AnimalKingdomAPI.Interfaces.Animal } public static var __selections: [Selection] { [ - .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .inlineFragment(AsBird.self), ] } - public var hash: String? { - get { __data["hash"] } - set { __data["hash"] = newValue } - } public var species: String { get { __data["species"] } set { __data["species"] = newValue } @@ -71,10 +66,6 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { get { __data["wingspan"] } set { __data["wingspan"] = newValue } } - public var hash: String? { - get { __data["hash"] } - set { __data["hash"] = newValue } - } public var species: String { get { __data["species"] } set { __data["species"] = newValue } diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift index 8f0f0edcd2..78fcfd1e39 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift @@ -18,7 +18,6 @@ public class AllAnimalsQuery: GraphQLQuery { } ...HeightInMeters ...WarmBloodedDetails - hash species skinCovering ... on Pet { @@ -81,7 +80,6 @@ public class AllAnimalsQuery: GraphQLQuery { public static var __parentType: ParentType { AnimalKingdomAPI.Interfaces.Animal } public static var __selections: [Selection] { [ .field("height", Height.self), - .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .field("predators", [Predator].self), @@ -94,7 +92,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -188,7 +185,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -232,7 +228,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -283,7 +278,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -333,7 +327,6 @@ public class AllAnimalsQuery: GraphQLQuery { public var isJellicle: Bool { __data["isJellicle"] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -381,7 +374,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -423,7 +415,6 @@ public class AllAnimalsQuery: GraphQLQuery { public var wingspan: Double { __data["wingspan"] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -475,7 +466,6 @@ public class AllAnimalsQuery: GraphQLQuery { public var favoriteToy: String { __data["favoriteToy"] } public var birthdate: CustomDate? { __data["birthdate"] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift index de41e1bbc1..86fe0ee92f 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -11,24 +11,17 @@ public struct PetSearchFilters: InputObject { } public init( - hash: GraphQLNullable = nil, species: [String], size: GraphQLNullable> = nil, measurements: GraphQLNullable = nil ) { __data = InputDict([ - "hash": hash, "species": species, "size": size, "measurements": measurements ]) } - public var hash: GraphQLNullable { - get { __data["hash"] } - set { __data["hash"] = newValue } - } - public var species: [String] { get { __data["species"] } set { __data["species"] = newValue } diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Bird+Mock.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Bird+Mock.graphql.swift index 90f3f322cd..604fb696ab 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Bird+Mock.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Bird+Mock.graphql.swift @@ -12,7 +12,6 @@ public class Bird: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -29,7 +28,6 @@ public extension Mock where O == Bird { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -43,7 +41,6 @@ public extension Mock where O == Bird { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Cat+Mock.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Cat+Mock.graphql.swift index 24aae20eb5..ed73cdd2ee 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Cat+Mock.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Cat+Mock.graphql.swift @@ -12,7 +12,6 @@ public class Cat: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -29,7 +28,6 @@ public extension Mock where O == Cat { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -43,7 +41,6 @@ public extension Mock where O == Cat { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Crocodile+Mock.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Crocodile+Mock.graphql.swift index c7a8ab844b..f427c054ee 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Crocodile+Mock.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Crocodile+Mock.graphql.swift @@ -10,7 +10,6 @@ public class Crocodile: MockObject { public typealias MockValueCollectionType = Array> public struct MockFields { - @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field<[Animal]>("predators") public var predators @@ -21,7 +20,6 @@ public class Crocodile: MockObject { public extension Mock where O == Crocodile { convenience init( - hash: String? = nil, height: Mock? = nil, id: ID? = nil, predators: [AnyMock]? = nil, @@ -29,7 +27,6 @@ public extension Mock where O == Crocodile { species: String? = nil ) { self.init() - self.hash = hash self.height = height self.id = id self.predators = predators diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Dog+Mock.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Dog+Mock.graphql.swift index aa653d1e80..001f8a5718 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Dog+Mock.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Dog+Mock.graphql.swift @@ -13,7 +13,6 @@ public class Dog: MockObject { @Field("birthdate") public var birthdate @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -30,7 +29,6 @@ public extension Mock where O == Dog { birthdate: CustomDate? = nil, bodyTemperature: Int? = nil, favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -44,7 +42,6 @@ public extension Mock where O == Dog { self.birthdate = birthdate self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Fish+Mock.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Fish+Mock.graphql.swift index fc0cf391c5..cd73c1409b 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Fish+Mock.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Fish+Mock.graphql.swift @@ -11,7 +11,6 @@ public class Fish: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -25,7 +24,6 @@ public class Fish: MockObject { public extension Mock where O == Fish { convenience init( favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -36,7 +34,6 @@ public extension Mock where O == Fish { ) { self.init() self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Human+Mock.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Human+Mock.graphql.swift index 477d2efcf1..92f0b59250 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Human+Mock.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Human+Mock.graphql.swift @@ -12,7 +12,6 @@ public class Human: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("firstName") public var firstName - @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field("laysEggs") public var laysEggs @@ -26,7 +25,6 @@ public extension Mock where O == Human { convenience init( bodyTemperature: Int? = nil, firstName: String? = nil, - hash: String? = nil, height: Mock? = nil, id: ID? = nil, laysEggs: Bool? = nil, @@ -37,7 +35,6 @@ public extension Mock where O == Human { self.init() self.bodyTemperature = bodyTemperature self.firstName = firstName - self.hash = hash self.height = height self.id = id self.laysEggs = laysEggs diff --git a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Rat+Mock.graphql.swift b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Rat+Mock.graphql.swift index 2555e18435..1d866195bc 100644 --- a/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Rat+Mock.graphql.swift +++ b/Sources/AnimalKingdomAPI/AnimalKingdomAPI/TestMocks/Rat+Mock.graphql.swift @@ -11,7 +11,6 @@ public class Rat: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -25,7 +24,6 @@ public class Rat: MockObject { public extension Mock where O == Rat { convenience init( favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -36,7 +34,6 @@ public extension Mock where O == Rat { ) { self.init() self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsLocalCacheMutation.graphql b/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsLocalCacheMutation.graphql index 7784908028..b9dc7be5f2 100644 --- a/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsLocalCacheMutation.graphql +++ b/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsLocalCacheMutation.graphql @@ -1,7 +1,6 @@ query AllAnimalsLocalCacheMutation @apollo_client_ios_localCacheMutation { allAnimals { - hash species skinCovering ... on Bird { diff --git a/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsQuery.graphql b/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsQuery.graphql index e14cb5c3a2..56c7bbf2bc 100644 --- a/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsQuery.graphql +++ b/Sources/AnimalKingdomAPI/animalkingdom-graphql/AllAnimalsQuery.graphql @@ -7,7 +7,6 @@ query AllAnimalsQuery { } ...HeightInMeters ...WarmBloodedDetails - hash species skinCovering ... on Pet { diff --git a/Sources/AnimalKingdomAPI/animalkingdom-graphql/AnimalSchema.graphqls b/Sources/AnimalKingdomAPI/animalkingdom-graphql/AnimalSchema.graphqls index 8220a4c927..d1a6974e32 100644 --- a/Sources/AnimalKingdomAPI/animalkingdom-graphql/AnimalSchema.graphqls +++ b/Sources/AnimalKingdomAPI/animalkingdom-graphql/AnimalSchema.graphqls @@ -27,7 +27,6 @@ input MeasurementsInput { } input PetSearchFilters { - hash: String species: [String!]! size: RelativeSize measurements: MeasurementsInput @@ -35,7 +34,6 @@ input PetSearchFilters { interface Animal { id: ID! - hash: String species: String! height: Height! predators: [Animal!]! diff --git a/Tests/ApolloCodegenTests/AnimalKingdomAPI/AnimalKingdomIRCreationTests.swift b/Tests/ApolloCodegenTests/AnimalKingdomAPI/AnimalKingdomIRCreationTests.swift index 4ac052b80a..e48689c663 100644 --- a/Tests/ApolloCodegenTests/AnimalKingdomAPI/AnimalKingdomIRCreationTests.swift +++ b/Tests/ApolloCodegenTests/AnimalKingdomAPI/AnimalKingdomIRCreationTests.swift @@ -105,8 +105,6 @@ final class AnimalKingdomIRCreationTests: XCTestCase { fields: [ .mock("height", type: .nonNull(.entity(GraphQLObjectType.mock("Height")))), - .mock("hash", - type: .scalar(GraphQLScalarType.string())), .mock("species", type: .nonNull(.scalar(GraphQLScalarType.string()))), .mock("skinCovering", @@ -357,8 +355,6 @@ final class AnimalKingdomIRCreationTests: XCTestCase { fields: [ .mock("height", type: .nonNull(.entity(GraphQLObjectType.mock("Height")))), - .mock("hash", - type: .scalar(GraphQLScalarType.string())), .mock("species", type: .nonNull(.scalar(GraphQLScalarType.string()))), .mock("skinCovering", @@ -474,8 +470,6 @@ final class AnimalKingdomIRCreationTests: XCTestCase { expected = ( fields: [ - .mock("hash", - type: .scalar(GraphQLScalarType.string())), .mock("species", type: .nonNull(.scalar(GraphQLScalarType.string()))), .mock("skinCovering", @@ -604,8 +598,6 @@ final class AnimalKingdomIRCreationTests: XCTestCase { fields: [ .mock("height", type: .nonNull(.entity(GraphQLObjectType.mock("Height")))), - .mock("hash", - type: .scalar(GraphQLScalarType.string())), .mock("species", type: .nonNull(.scalar(GraphQLScalarType.string()))), .mock("skinCovering", @@ -730,8 +722,6 @@ final class AnimalKingdomIRCreationTests: XCTestCase { fields: [ .mock("height", type: .nonNull(.entity(GraphQLObjectType.mock("Height")))), - .mock("hash", - type: .scalar(GraphQLScalarType.string())), .mock("species", type: .nonNull(.scalar(GraphQLScalarType.string()))), .mock("skinCovering", @@ -856,8 +846,6 @@ final class AnimalKingdomIRCreationTests: XCTestCase { fields: [ .mock("height", type: .nonNull(.entity(GraphQLObjectType.mock("Height")))), - .mock("hash", - type: .scalar(GraphQLScalarType.string())), .mock("species", type: .nonNull(.scalar(GraphQLScalarType.string()))), .mock("skinCovering", @@ -921,8 +909,6 @@ final class AnimalKingdomIRCreationTests: XCTestCase { fields: [ .mock("height", type: .nonNull(.entity(GraphQLObjectType.mock("Height")))), - .mock("hash", - type: .scalar(GraphQLScalarType.string())), .mock("species", type: .nonNull(.scalar(GraphQLScalarType.string()))), .mock("skinCovering", diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift index 91c85295d2..407230e51a 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift @@ -32,16 +32,11 @@ public extension MyGraphQLSchema { public static var __parentType: ParentType { MyGraphQLSchema.Interfaces.Animal } public static var __selections: [Selection] { [ - .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .inlineFragment(AsBird.self), ] } - public var hash: String? { - get { __data["hash"] } - set { __data["hash"] = newValue } - } public var species: String { get { __data["species"] } set { __data["species"] = newValue } @@ -72,10 +67,6 @@ public extension MyGraphQLSchema { get { __data["wingspan"] } set { __data["wingspan"] = newValue } } - public var hash: String? { - get { __data["hash"] } - set { __data["hash"] = newValue } - } public var species: String { get { __data["species"] } set { __data["species"] = newValue } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Operations/Queries/AllAnimalsQuery.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Operations/Queries/AllAnimalsQuery.graphql.swift index 81ed86fcee..ccdf19143b 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Operations/Queries/AllAnimalsQuery.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Operations/Queries/AllAnimalsQuery.graphql.swift @@ -19,7 +19,6 @@ public extension MyGraphQLSchema { } ...HeightInMeters ...WarmBloodedDetails - hash species skinCovering ... on Pet { @@ -89,7 +88,6 @@ public extension MyGraphQLSchema { public static var __parentType: ParentType { MyGraphQLSchema.Interfaces.Animal } public static var __selections: [Selection] { [ .field("height", Height.self), - .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .field("predators", [Predator].self), @@ -102,7 +100,6 @@ public extension MyGraphQLSchema { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -196,7 +193,6 @@ public extension MyGraphQLSchema { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -240,7 +236,6 @@ public extension MyGraphQLSchema { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -291,7 +286,6 @@ public extension MyGraphQLSchema { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -341,7 +335,6 @@ public extension MyGraphQLSchema { public var isJellicle: Bool { __data["isJellicle"] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -389,7 +382,6 @@ public extension MyGraphQLSchema { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -431,7 +423,6 @@ public extension MyGraphQLSchema { public var wingspan: Double { __data["wingspan"] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -483,7 +474,6 @@ public extension MyGraphQLSchema { public var favoriteToy: String { __data["favoriteToy"] } public var birthdate: CustomDate? { __data["birthdate"] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetSearchFilters.graphql.swift index 19a281b699..824d5e061b 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Sources/MySwiftPackage/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -12,24 +12,17 @@ public extension MyGraphQLSchema { } public init( - hash: GraphQLNullable = nil, species: [String], size: GraphQLNullable> = nil, measurements: GraphQLNullable = nil ) { __data = InputDict([ - "hash": hash, "species": species, "size": size, "measurements": measurements ]) } - public var hash: GraphQLNullable { - get { __data["hash"] } - set { __data["hash"] = newValue } - } - public var species: [String] { get { __data["species"] } set { __data["species"] = newValue } diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Bird+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Bird+Mock.graphql.swift index 8a9e49c555..639da23a20 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Bird+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Bird+Mock.graphql.swift @@ -12,7 +12,6 @@ public class Bird: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -29,7 +28,6 @@ public extension Mock where O == Bird { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: MyGraphQLSchema.ID? = nil, @@ -43,7 +41,6 @@ public extension Mock where O == Bird { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Cat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Cat+Mock.graphql.swift index caccc38a57..0a6f3d0e8f 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Cat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Cat+Mock.graphql.swift @@ -12,7 +12,6 @@ public class Cat: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -29,7 +28,6 @@ public extension Mock where O == Cat { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: MyGraphQLSchema.ID? = nil, @@ -43,7 +41,6 @@ public extension Mock where O == Cat { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Crocodile+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Crocodile+Mock.graphql.swift index c7205cf3a8..02a196f9ad 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Crocodile+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Crocodile+Mock.graphql.swift @@ -10,7 +10,6 @@ public class Crocodile: MockObject { public typealias MockValueCollectionType = Array> public struct MockFields { - @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field<[Animal]>("predators") public var predators @@ -21,7 +20,6 @@ public class Crocodile: MockObject { public extension Mock where O == Crocodile { convenience init( - hash: String? = nil, height: Mock? = nil, id: MyGraphQLSchema.ID? = nil, predators: [AnyMock]? = nil, @@ -29,7 +27,6 @@ public extension Mock where O == Crocodile { species: String? = nil ) { self.init() - self.hash = hash self.height = height self.id = id self.predators = predators diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Dog+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Dog+Mock.graphql.swift index 1b65c2ef63..0b772d066f 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Dog+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Dog+Mock.graphql.swift @@ -13,7 +13,6 @@ public class Dog: MockObject { @Field("birthdate") public var birthdate @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -30,7 +29,6 @@ public extension Mock where O == Dog { birthdate: MyGraphQLSchema.CustomDate? = nil, bodyTemperature: Int? = nil, favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: MyGraphQLSchema.ID? = nil, @@ -44,7 +42,6 @@ public extension Mock where O == Dog { self.birthdate = birthdate self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Fish+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Fish+Mock.graphql.swift index f41762bdf2..4128aa3492 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Fish+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Fish+Mock.graphql.swift @@ -11,7 +11,6 @@ public class Fish: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -25,7 +24,6 @@ public class Fish: MockObject { public extension Mock where O == Fish { convenience init( favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: MyGraphQLSchema.ID? = nil, @@ -36,7 +34,6 @@ public extension Mock where O == Fish { ) { self.init() self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Human+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Human+Mock.graphql.swift index 8a54daeadc..973133c212 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Human+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Human+Mock.graphql.swift @@ -12,7 +12,6 @@ public class Human: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("firstName") public var firstName - @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field("laysEggs") public var laysEggs @@ -26,7 +25,6 @@ public extension Mock where O == Human { convenience init( bodyTemperature: Int? = nil, firstName: String? = nil, - hash: String? = nil, height: Mock? = nil, id: MyGraphQLSchema.ID? = nil, laysEggs: Bool? = nil, @@ -37,7 +35,6 @@ public extension Mock where O == Human { self.init() self.bodyTemperature = bodyTemperature self.firstName = firstName - self.hash = hash self.height = height self.id = id self.laysEggs = laysEggs diff --git a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Rat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Rat+Mock.graphql.swift index 47f43401b5..09a9748070 100644 --- a/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Rat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/EmbeddedInTarget-InSchemaModule/Tests/MySwiftPackageTests/TestMocks/Rat+Mock.graphql.swift @@ -11,7 +11,6 @@ public class Rat: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -25,7 +24,6 @@ public class Rat: MockObject { public extension Mock where O == Rat { convenience init( favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: MyGraphQLSchema.ID? = nil, @@ -36,7 +34,6 @@ public extension Mock where O == Rat { ) { self.init() self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift index 187c15ed73..c78ce3d324 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift @@ -31,16 +31,11 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { public static var __parentType: ParentType { MyCustomProject.Interfaces.Animal } public static var __selections: [Selection] { [ - .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .inlineFragment(AsBird.self), ] } - public var hash: String? { - get { __data["hash"] } - set { __data["hash"] = newValue } - } public var species: String { get { __data["species"] } set { __data["species"] = newValue } @@ -71,10 +66,6 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { get { __data["wingspan"] } set { __data["wingspan"] = newValue } } - public var hash: String? { - get { __data["hash"] } - set { __data["hash"] = newValue } - } public var species: String { get { __data["species"] } set { __data["species"] = newValue } diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Operations/Queries/AllAnimalsQuery.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Operations/Queries/AllAnimalsQuery.graphql.swift index 887d024774..706f14bbc3 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Operations/Queries/AllAnimalsQuery.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Operations/Queries/AllAnimalsQuery.graphql.swift @@ -18,7 +18,6 @@ public class AllAnimalsQuery: GraphQLQuery { } ...HeightInMeters ...WarmBloodedDetails - hash species skinCovering ... on Pet { @@ -81,7 +80,6 @@ public class AllAnimalsQuery: GraphQLQuery { public static var __parentType: ParentType { MyCustomProject.Interfaces.Animal } public static var __selections: [Selection] { [ .field("height", Height.self), - .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .field("predators", [Predator].self), @@ -94,7 +92,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -188,7 +185,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -232,7 +228,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -283,7 +278,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -333,7 +327,6 @@ public class AllAnimalsQuery: GraphQLQuery { public var isJellicle: Bool { __data["isJellicle"] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -381,7 +374,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -423,7 +415,6 @@ public class AllAnimalsQuery: GraphQLQuery { public var wingspan: Double { __data["wingspan"] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -475,7 +466,6 @@ public class AllAnimalsQuery: GraphQLQuery { public var favoriteToy: String { __data["favoriteToy"] } public var birthdate: CustomDate? { __data["birthdate"] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetSearchFilters.graphql.swift index 11f64b4bb8..43709cfc17 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProject/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -11,24 +11,17 @@ public struct PetSearchFilters: InputObject { } public init( - hash: GraphQLNullable = nil, species: [String], size: GraphQLNullable> = nil, measurements: GraphQLNullable = nil ) { __data = InputDict([ - "hash": hash, "species": species, "size": size, "measurements": measurements ]) } - public var hash: GraphQLNullable { - get { __data["hash"] } - set { __data["hash"] = newValue } - } - public var species: [String] { get { __data["species"] } set { __data["species"] = newValue } diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Bird+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Bird+Mock.graphql.swift index 58823f6070..ae72a2a853 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Bird+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Bird+Mock.graphql.swift @@ -12,7 +12,6 @@ public class Bird: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -29,7 +28,6 @@ public extension Mock where O == Bird { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -43,7 +41,6 @@ public extension Mock where O == Bird { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Cat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Cat+Mock.graphql.swift index a7bc40e81e..85e4ee3cd7 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Cat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Cat+Mock.graphql.swift @@ -12,7 +12,6 @@ public class Cat: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -29,7 +28,6 @@ public extension Mock where O == Cat { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -43,7 +41,6 @@ public extension Mock where O == Cat { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Crocodile+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Crocodile+Mock.graphql.swift index 53d07509fb..761175e46f 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Crocodile+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Crocodile+Mock.graphql.swift @@ -10,7 +10,6 @@ public class Crocodile: MockObject { public typealias MockValueCollectionType = Array> public struct MockFields { - @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field<[Animal]>("predators") public var predators @@ -21,7 +20,6 @@ public class Crocodile: MockObject { public extension Mock where O == Crocodile { convenience init( - hash: String? = nil, height: Mock? = nil, id: ID? = nil, predators: [AnyMock]? = nil, @@ -29,7 +27,6 @@ public extension Mock where O == Crocodile { species: String? = nil ) { self.init() - self.hash = hash self.height = height self.id = id self.predators = predators diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Dog+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Dog+Mock.graphql.swift index 23fa81a0a7..0375238ba1 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Dog+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Dog+Mock.graphql.swift @@ -13,7 +13,6 @@ public class Dog: MockObject { @Field("birthdate") public var birthdate @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -30,7 +29,6 @@ public extension Mock where O == Dog { birthdate: CustomDate? = nil, bodyTemperature: Int? = nil, favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -44,7 +42,6 @@ public extension Mock where O == Dog { self.birthdate = birthdate self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Fish+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Fish+Mock.graphql.swift index 456d5d3027..fabfdb63dd 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Fish+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Fish+Mock.graphql.swift @@ -11,7 +11,6 @@ public class Fish: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -25,7 +24,6 @@ public class Fish: MockObject { public extension Mock where O == Fish { convenience init( favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -36,7 +34,6 @@ public extension Mock where O == Fish { ) { self.init() self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Human+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Human+Mock.graphql.swift index 21af33afd5..1574a0af8f 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Human+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Human+Mock.graphql.swift @@ -12,7 +12,6 @@ public class Human: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("firstName") public var firstName - @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field("laysEggs") public var laysEggs @@ -26,7 +25,6 @@ public extension Mock where O == Human { convenience init( bodyTemperature: Int? = nil, firstName: String? = nil, - hash: String? = nil, height: Mock? = nil, id: ID? = nil, laysEggs: Bool? = nil, @@ -37,7 +35,6 @@ public extension Mock where O == Human { self.init() self.bodyTemperature = bodyTemperature self.firstName = firstName - self.hash = hash self.height = height self.id = id self.laysEggs = laysEggs diff --git a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Rat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Rat+Mock.graphql.swift index efaa55dda9..97ffd63df5 100644 --- a/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Rat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/Other-CocoaPods/MyCustomProjectTests/TestMocks/Rat+Mock.graphql.swift @@ -11,7 +11,6 @@ public class Rat: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -25,7 +24,6 @@ public class Rat: MockObject { public extension Mock where O == Rat { convenience init( favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -36,7 +34,6 @@ public extension Mock where O == Rat { ) { self.init() self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift index 4555d0b63e..8cc42121ce 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift @@ -31,16 +31,11 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { public static var __parentType: ParentType { AnimalKingdomAPI.Interfaces.Animal } public static var __selections: [Selection] { [ - .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .inlineFragment(AsBird.self), ] } - public var hash: String? { - get { __data["hash"] } - set { __data["hash"] = newValue } - } public var species: String { get { __data["species"] } set { __data["species"] = newValue } @@ -71,10 +66,6 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { get { __data["wingspan"] } set { __data["wingspan"] = newValue } } - public var hash: String? { - get { __data["hash"] } - set { __data["hash"] = newValue } - } public var species: String { get { __data["species"] } set { __data["species"] = newValue } diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift index fc0795f508..73216f6b36 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift @@ -18,7 +18,6 @@ public class AllAnimalsQuery: GraphQLQuery { } ...HeightInMeters ...WarmBloodedDetails - hash species skinCovering ... on Pet { @@ -88,7 +87,6 @@ public class AllAnimalsQuery: GraphQLQuery { public static var __parentType: ParentType { AnimalKingdomAPI.Interfaces.Animal } public static var __selections: [Selection] { [ .field("height", Height.self), - .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .field("predators", [Predator].self), @@ -101,7 +99,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -195,7 +192,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -239,7 +235,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -290,7 +285,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -340,7 +334,6 @@ public class AllAnimalsQuery: GraphQLQuery { public var isJellicle: Bool { __data["isJellicle"] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -388,7 +381,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -430,7 +422,6 @@ public class AllAnimalsQuery: GraphQLQuery { public var wingspan: Double { __data["wingspan"] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -482,7 +473,6 @@ public class AllAnimalsQuery: GraphQLQuery { public var favoriteToy: String { __data["favoriteToy"] } public var birthdate: CustomDate? { __data["birthdate"] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift index de41e1bbc1..86fe0ee92f 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -11,24 +11,17 @@ public struct PetSearchFilters: InputObject { } public init( - hash: GraphQLNullable = nil, species: [String], size: GraphQLNullable> = nil, measurements: GraphQLNullable = nil ) { __data = InputDict([ - "hash": hash, "species": species, "size": size, "measurements": measurements ]) } - public var hash: GraphQLNullable { - get { __data["hash"] } - set { __data["hash"] = newValue } - } - public var species: [String] { get { __data["species"] } set { __data["species"] = newValue } diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Bird+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Bird+Mock.graphql.swift index 90f3f322cd..604fb696ab 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Bird+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Bird+Mock.graphql.swift @@ -12,7 +12,6 @@ public class Bird: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -29,7 +28,6 @@ public extension Mock where O == Bird { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -43,7 +41,6 @@ public extension Mock where O == Bird { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Cat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Cat+Mock.graphql.swift index 24aae20eb5..ed73cdd2ee 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Cat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Cat+Mock.graphql.swift @@ -12,7 +12,6 @@ public class Cat: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -29,7 +28,6 @@ public extension Mock where O == Cat { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -43,7 +41,6 @@ public extension Mock where O == Cat { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Crocodile+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Crocodile+Mock.graphql.swift index c7a8ab844b..f427c054ee 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Crocodile+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Crocodile+Mock.graphql.swift @@ -10,7 +10,6 @@ public class Crocodile: MockObject { public typealias MockValueCollectionType = Array> public struct MockFields { - @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field<[Animal]>("predators") public var predators @@ -21,7 +20,6 @@ public class Crocodile: MockObject { public extension Mock where O == Crocodile { convenience init( - hash: String? = nil, height: Mock? = nil, id: ID? = nil, predators: [AnyMock]? = nil, @@ -29,7 +27,6 @@ public extension Mock where O == Crocodile { species: String? = nil ) { self.init() - self.hash = hash self.height = height self.id = id self.predators = predators diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Dog+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Dog+Mock.graphql.swift index aa653d1e80..001f8a5718 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Dog+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Dog+Mock.graphql.swift @@ -13,7 +13,6 @@ public class Dog: MockObject { @Field("birthdate") public var birthdate @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -30,7 +29,6 @@ public extension Mock where O == Dog { birthdate: CustomDate? = nil, bodyTemperature: Int? = nil, favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -44,7 +42,6 @@ public extension Mock where O == Dog { self.birthdate = birthdate self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Fish+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Fish+Mock.graphql.swift index fc0cf391c5..cd73c1409b 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Fish+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Fish+Mock.graphql.swift @@ -11,7 +11,6 @@ public class Fish: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -25,7 +24,6 @@ public class Fish: MockObject { public extension Mock where O == Fish { convenience init( favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -36,7 +34,6 @@ public extension Mock where O == Fish { ) { self.init() self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Human+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Human+Mock.graphql.swift index 477d2efcf1..92f0b59250 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Human+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Human+Mock.graphql.swift @@ -12,7 +12,6 @@ public class Human: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("firstName") public var firstName - @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field("laysEggs") public var laysEggs @@ -26,7 +25,6 @@ public extension Mock where O == Human { convenience init( bodyTemperature: Int? = nil, firstName: String? = nil, - hash: String? = nil, height: Mock? = nil, id: ID? = nil, laysEggs: Bool? = nil, @@ -37,7 +35,6 @@ public extension Mock where O == Human { self.init() self.bodyTemperature = bodyTemperature self.firstName = firstName - self.hash = hash self.height = height self.id = id self.laysEggs = laysEggs diff --git a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Rat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Rat+Mock.graphql.swift index 2555e18435..1d866195bc 100644 --- a/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Rat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SPMInXcodeProject/TestMocks/Rat+Mock.graphql.swift @@ -11,7 +11,6 @@ public class Rat: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -25,7 +24,6 @@ public class Rat: MockObject { public extension Mock where O == Rat { convenience init( favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -36,7 +34,6 @@ public extension Mock where O == Rat { ) { self.init() self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift index a327906551..50745e9e95 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/LocalCacheMutations/AllAnimalsLocalCacheMutation.graphql.swift @@ -31,16 +31,11 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { public static var __parentType: ParentType { GraphQLSchemaName.Interfaces.Animal } public static var __selections: [Selection] { [ - .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .inlineFragment(AsBird.self), ] } - public var hash: String? { - get { __data["hash"] } - set { __data["hash"] = newValue } - } public var species: String { get { __data["species"] } set { __data["species"] = newValue } @@ -71,10 +66,6 @@ public class AllAnimalsLocalCacheMutation: LocalCacheMutation { get { __data["wingspan"] } set { __data["wingspan"] = newValue } } - public var hash: String? { - get { __data["hash"] } - set { __data["hash"] = newValue } - } public var species: String { get { __data["species"] } set { __data["species"] = newValue } diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift index f8159d52eb..d841878103 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Operations/Queries/AllAnimalsQuery.graphql.swift @@ -18,7 +18,6 @@ public class AllAnimalsQuery: GraphQLQuery { } ...HeightInMeters ...WarmBloodedDetails - hash species skinCovering ... on Pet { @@ -88,7 +87,6 @@ public class AllAnimalsQuery: GraphQLQuery { public static var __parentType: ParentType { GraphQLSchemaName.Interfaces.Animal } public static var __selections: [Selection] { [ .field("height", Height.self), - .field("hash", String?.self), .field("species", String.self), .field("skinCovering", GraphQLEnum?.self), .field("predators", [Predator].self), @@ -101,7 +99,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -195,7 +192,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -239,7 +235,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -290,7 +285,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -340,7 +334,6 @@ public class AllAnimalsQuery: GraphQLQuery { public var isJellicle: Bool { __data["isJellicle"] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -388,7 +381,6 @@ public class AllAnimalsQuery: GraphQLQuery { ] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -430,7 +422,6 @@ public class AllAnimalsQuery: GraphQLQuery { public var wingspan: Double { __data["wingspan"] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } @@ -482,7 +473,6 @@ public class AllAnimalsQuery: GraphQLQuery { public var favoriteToy: String { __data["favoriteToy"] } public var birthdate: CustomDate? { __data["birthdate"] } public var height: Height { __data["height"] } - public var hash: String? { __data["hash"] } public var species: String { __data["species"] } public var skinCovering: GraphQLEnum? { __data["skinCovering"] } public var predators: [Predator] { __data["predators"] } diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift index de41e1bbc1..86fe0ee92f 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/Sources/Schema/InputObjects/PetSearchFilters.graphql.swift @@ -11,24 +11,17 @@ public struct PetSearchFilters: InputObject { } public init( - hash: GraphQLNullable = nil, species: [String], size: GraphQLNullable> = nil, measurements: GraphQLNullable = nil ) { __data = InputDict([ - "hash": hash, "species": species, "size": size, "measurements": measurements ]) } - public var hash: GraphQLNullable { - get { __data["hash"] } - set { __data["hash"] = newValue } - } - public var species: [String] { get { __data["species"] } set { __data["species"] = newValue } diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Bird+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Bird+Mock.graphql.swift index 58bb4b5bd4..23ea7a29ac 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Bird+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Bird+Mock.graphql.swift @@ -12,7 +12,6 @@ public class Bird: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -29,7 +28,6 @@ public extension Mock where O == Bird { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -43,7 +41,6 @@ public extension Mock where O == Bird { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Cat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Cat+Mock.graphql.swift index 472243f920..417795d601 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Cat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Cat+Mock.graphql.swift @@ -12,7 +12,6 @@ public class Cat: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -29,7 +28,6 @@ public extension Mock where O == Cat { convenience init( bodyTemperature: Int? = nil, favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -43,7 +41,6 @@ public extension Mock where O == Cat { self.init() self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Crocodile+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Crocodile+Mock.graphql.swift index ca8668d098..8cf1926e20 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Crocodile+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Crocodile+Mock.graphql.swift @@ -10,7 +10,6 @@ public class Crocodile: MockObject { public typealias MockValueCollectionType = Array> public struct MockFields { - @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field<[Animal]>("predators") public var predators @@ -21,7 +20,6 @@ public class Crocodile: MockObject { public extension Mock where O == Crocodile { convenience init( - hash: String? = nil, height: Mock? = nil, id: ID? = nil, predators: [AnyMock]? = nil, @@ -29,7 +27,6 @@ public extension Mock where O == Crocodile { species: String? = nil ) { self.init() - self.hash = hash self.height = height self.id = id self.predators = predators diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Dog+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Dog+Mock.graphql.swift index f840e01b77..8b1900cf54 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Dog+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Dog+Mock.graphql.swift @@ -13,7 +13,6 @@ public class Dog: MockObject { @Field("birthdate") public var birthdate @Field("bodyTemperature") public var bodyTemperature @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -30,7 +29,6 @@ public extension Mock where O == Dog { birthdate: CustomDate? = nil, bodyTemperature: Int? = nil, favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -44,7 +42,6 @@ public extension Mock where O == Dog { self.birthdate = birthdate self.bodyTemperature = bodyTemperature self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Fish+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Fish+Mock.graphql.swift index 9ea68f8266..d34dbeac4d 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Fish+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Fish+Mock.graphql.swift @@ -11,7 +11,6 @@ public class Fish: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -25,7 +24,6 @@ public class Fish: MockObject { public extension Mock where O == Fish { convenience init( favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -36,7 +34,6 @@ public extension Mock where O == Fish { ) { self.init() self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Human+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Human+Mock.graphql.swift index bb4e9cd7f2..1e8f1c4ca5 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Human+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Human+Mock.graphql.swift @@ -12,7 +12,6 @@ public class Human: MockObject { public struct MockFields { @Field("bodyTemperature") public var bodyTemperature @Field("firstName") public var firstName - @Field("hash") public var hash @Field("height") public var height @Field("id") public var id @Field("laysEggs") public var laysEggs @@ -26,7 +25,6 @@ public extension Mock where O == Human { convenience init( bodyTemperature: Int? = nil, firstName: String? = nil, - hash: String? = nil, height: Mock? = nil, id: ID? = nil, laysEggs: Bool? = nil, @@ -37,7 +35,6 @@ public extension Mock where O == Human { self.init() self.bodyTemperature = bodyTemperature self.firstName = firstName - self.hash = hash self.height = height self.id = id self.laysEggs = laysEggs diff --git a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Rat+Mock.graphql.swift b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Rat+Mock.graphql.swift index 396b320728..02e6bea53d 100644 --- a/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Rat+Mock.graphql.swift +++ b/Tests/TestCodeGenConfigurations/SwiftPackageManager/TestMocks/Rat+Mock.graphql.swift @@ -11,7 +11,6 @@ public class Rat: MockObject { public struct MockFields { @Field("favoriteToy") public var favoriteToy - @Field("hash") public var hash @Field("height") public var height @Field("humanName") public var humanName @Field("id") public var id @@ -25,7 +24,6 @@ public class Rat: MockObject { public extension Mock where O == Rat { convenience init( favoriteToy: String? = nil, - hash: String? = nil, height: Mock? = nil, humanName: String? = nil, id: ID? = nil, @@ -36,7 +34,6 @@ public extension Mock where O == Rat { ) { self.init() self.favoriteToy = favoriteToy - self.hash = hash self.height = height self.humanName = humanName self.id = id