-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
5a8b311
commit 4c87fc4
Showing
31 changed files
with
2,070 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
...s/AnimalKingdomAPI/AnimalKingdomAPI/Sources/Operations/Queries/FindPetQuery.graphql.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// @generated | ||
// This file was automatically generated and should not be edited. | ||
|
||
@_exported import ApolloAPI | ||
|
||
public class FindPetQuery: GraphQLQuery { | ||
public static let operationName: String = "FindPet" | ||
public static let operationDocument: ApolloAPI.OperationDocument = .init( | ||
definition: .init( | ||
#"query FindPet($input: PetSearchInput!) { findPet(input: $input) { __typename id humanName } }"# | ||
)) | ||
|
||
public var input: PetSearchInput | ||
|
||
public init(input: PetSearchInput) { | ||
self.input = input | ||
} | ||
|
||
public var __variables: Variables? { ["input": input] } | ||
|
||
public struct Data: AnimalKingdomAPI.SelectionSet { | ||
public let __data: DataDict | ||
public init(_dataDict: DataDict) { __data = _dataDict } | ||
|
||
public static var __parentType: any ApolloAPI.ParentType { AnimalKingdomAPI.Objects.Query } | ||
public static var __selections: [ApolloAPI.Selection] { [ | ||
.field("findPet", [FindPet].self, arguments: ["input": .variable("input")]), | ||
] } | ||
|
||
public var findPet: [FindPet] { __data["findPet"] } | ||
|
||
public init( | ||
findPet: [FindPet] | ||
) { | ||
self.init(_dataDict: DataDict( | ||
data: [ | ||
"__typename": AnimalKingdomAPI.Objects.Query.typename, | ||
"findPet": findPet._fieldData, | ||
], | ||
fulfilledFragments: [ | ||
ObjectIdentifier(FindPetQuery.Data.self) | ||
] | ||
)) | ||
} | ||
|
||
/// FindPet | ||
/// | ||
/// Parent Type: `Pet` | ||
public struct FindPet: AnimalKingdomAPI.SelectionSet { | ||
public let __data: DataDict | ||
public init(_dataDict: DataDict) { __data = _dataDict } | ||
|
||
public static var __parentType: any ApolloAPI.ParentType { AnimalKingdomAPI.Interfaces.Pet } | ||
public static var __selections: [ApolloAPI.Selection] { [ | ||
.field("__typename", String.self), | ||
.field("id", AnimalKingdomAPI.ID.self), | ||
.field("humanName", String?.self), | ||
] } | ||
|
||
public var id: AnimalKingdomAPI.ID { __data["id"] } | ||
public var humanName: String? { __data["humanName"] } | ||
|
||
public init( | ||
__typename: String, | ||
id: AnimalKingdomAPI.ID, | ||
humanName: String? = nil | ||
) { | ||
self.init(_dataDict: DataDict( | ||
data: [ | ||
"__typename": __typename, | ||
"id": id, | ||
"humanName": humanName, | ||
], | ||
fulfilledFragments: [ | ||
ObjectIdentifier(FindPetQuery.Data.FindPet.self) | ||
] | ||
)) | ||
} | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...nimalKingdomAPI/AnimalKingdomAPI/Sources/Schema/InputObjects/PetSearchInput.graphql.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// @generated | ||
// This file was automatically generated and should not be edited. | ||
|
||
import ApolloAPI | ||
|
||
public enum PetSearchInput: OneOfInputObject { | ||
case ownerID(ID) | ||
case petID(ID) | ||
case searchFilters(PetSearchFilters) | ||
|
||
public var __data: InputDict { | ||
switch self { | ||
case .ownerID(let value): | ||
return InputDict(["ownerID": value]) | ||
case .petID(let value): | ||
return InputDict(["petID": value]) | ||
case .searchFilters(let value): | ||
return InputDict(["searchFilters": value]) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
Sources/AnimalKingdomAPI/animalkingdom-graphql/FindPetQuery.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query FindPet($input: PetSearchInput!) { | ||
findPet(input: $input) { | ||
id | ||
humanName | ||
} | ||
} | ||
|
Oops, something went wrong.