Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions final/RocketReserver.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
E67B2DEF2C7D02BC0095602B /* UserView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserView.swift; sourceTree = "<group>"; };
E67B2DF12C7D03180095602B /* UserViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserViewModel.swift; sourceTree = "<group>"; };
E67B2DF32C7D27620095602B /* Me.graphql */ = {isa = PBXFileReference; lastKnownFileType = text; path = Me.graphql; sourceTree = "<group>"; };
E6F3F8F22C87D896002A01EB /* apollo-codegen-config.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "apollo-codegen-config.json"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -99,6 +100,7 @@
66F96F8E29FAC0D600713B80 = {
isa = PBXGroup;
children = (
E6F3F8F22C87D896002A01EB /* apollo-codegen-config.json */,
66D7A53A2A056886009DDB89 /* graphql */,
66F96FCD29FAD2DD00713B80 /* Packages */,
66F96F9929FAC0D600713B80 /* RocketReserver */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
public class BookTripMutation: GraphQLMutation {
public static let operationName: String = "BookTrip"
public static let operationDocument: ApolloAPI.OperationDocument = .init(
operationIdentifier: "6669e04c6fbeb58333331f745fb8f913bbbf14358309fba9ebb934ec35bbf2e9",
definition: .init(
#"mutation BookTrip($id: ID!) { bookTrips(launchIds: [$id]) { __typename success message launches { __typename ...LaunchListDetail isBooked } } }"#,
fragments: [LaunchListDetail.self]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
public class CancelTripMutation: GraphQLMutation {
public static let operationName: String = "CancelTrip"
public static let operationDocument: ApolloAPI.OperationDocument = .init(
operationIdentifier: "fc0763adcfa1b9ae4d3cb5e876beb0a00f66205598c8bf2d401333bba6000024",
definition: .init(
#"mutation CancelTrip($launchId: ID!) { cancelTrip(launchId: $launchId) { __typename success message launches { __typename id isBooked } } }"#
))
Expand Down Expand Up @@ -67,4 +68,4 @@ public class CancelTripMutation: GraphQLMutation {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
public class LoginMutation: GraphQLMutation {
public static let operationName: String = "Login"
public static let operationDocument: ApolloAPI.OperationDocument = .init(
operationIdentifier: "efa1f4a8bcbcb0afb2d51e50dccc4f9edb8fee7795f49bd470fb688bb8fb5e3b",
definition: .init(
#"mutation Login($email: String!) { login(email: $email) { __typename token } }"#
))
Expand Down Expand Up @@ -45,4 +46,4 @@ public class LoginMutation: GraphQLMutation {
public var token: String? { __data["token"] }
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
public class LaunchDetailsQuery: GraphQLQuery {
public static let operationName: String = "LaunchDetails"
public static let operationDocument: ApolloAPI.OperationDocument = .init(
operationIdentifier: "d7744a7f83cbf4af89458955226445842978163c7a0bddce521e2e113da3b109",
definition: .init(
#"query LaunchDetails($launchId: ID!) { launch(id: $launchId) { __typename id site mission { __typename name missionPatch(size: LARGE) } rocket { __typename name type } isBooked } }"#
))
Expand Down Expand Up @@ -89,4 +90,4 @@ public class LaunchDetailsQuery: GraphQLQuery {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
public class LaunchListQuery: GraphQLQuery {
public static let operationName: String = "LaunchList"
public static let operationDocument: ApolloAPI.OperationDocument = .init(
operationIdentifier: "e36bde514d89c67c77502cf15141ea4298d05951aff731bc00bd33dc2d1726d7",
definition: .init(
#"query LaunchList($cursor: String) { launches(after: $cursor) { __typename cursor hasMore launches { __typename ...LaunchListDetail } } }"#,
fragments: [LaunchListDetail.self]
Expand Down Expand Up @@ -77,4 +78,4 @@ public class LaunchListQuery: GraphQLQuery {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
public class MeQuery: GraphQLQuery {
public static let operationName: String = "Me"
public static let operationDocument: ApolloAPI.OperationDocument = .init(
operationIdentifier: "461f1e9fef673b78d9c0aeea35efcca1e89930d36c124f5e2988eb2d3e47b6fc",
definition: .init(
#"query Me { me { __typename trips { __typename ...LaunchListDetail isBooked } } }"#,
fragments: [LaunchListDetail.self]
Expand Down Expand Up @@ -69,4 +70,4 @@ public class MeQuery: GraphQLQuery {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
public class TripsBookedSubscription: GraphQLSubscription {
public static let operationName: String = "TripsBooked"
public static let operationDocument: ApolloAPI.OperationDocument = .init(
operationIdentifier: "efbc2aedb0b53499cb2e72e21aa6c74789dae5d5b8e0195657cc95f1f5509b02",
definition: .init(
#"subscription TripsBooked { tripsBooked }"#
))
Expand All @@ -23,4 +24,4 @@ public class TripsBookedSubscription: GraphQLSubscription {

public var tripsBooked: Int? { __data["tripsBooked"] }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"format": "apollo-persisted-query-manifest",
"version": 1,
"operations": [
{
"id": "461f1e9fef673b78d9c0aeea35efcca1e89930d36c124f5e2988eb2d3e47b6fc",
"body": "query Me { me { __typename trips { __typename ...LaunchListDetail isBooked } } }\nfragment LaunchListDetail on Launch { __typename id site mission { __typename name missionPatch(size: SMALL) } }",
"name": "Me",
"type": "query"
},
{
"id": "ace9720c2a09e6c4f3cb4b1274529f38eee4db09efcce25b6d5ad771d3e617bd",
"body": "query MeTrips { me { __typename trips { __typename ...LaunchListDetail isBooked } } }\nfragment LaunchListDetail on Launch { __typename id site mission { __typename name missionPatch(size: SMALL) } }",
"name": "MeTrips",
"type": "query"
},
{
"id": "efa1f4a8bcbcb0afb2d51e50dccc4f9edb8fee7795f49bd470fb688bb8fb5e3b",
"body": "mutation Login($email: String!) { login(email: $email) { __typename token } }",
"name": "Login",
"type": "mutation"
},
{
"id": "d7744a7f83cbf4af89458955226445842978163c7a0bddce521e2e113da3b109",
"body": "query LaunchDetails($launchId: ID!) { launch(id: $launchId) { __typename id site mission { __typename name missionPatch(size: LARGE) } rocket { __typename name type } isBooked } }",
"name": "LaunchDetails",
"type": "query"
},
{
"id": "6669e04c6fbeb58333331f745fb8f913bbbf14358309fba9ebb934ec35bbf2e9",
"body": "mutation BookTrip($id: ID!) { bookTrips(launchIds: [$id]) { __typename success message launches { __typename ...LaunchListDetail isBooked } } }\nfragment LaunchListDetail on Launch { __typename id site mission { __typename name missionPatch(size: SMALL) } }",
"name": "BookTrip",
"type": "mutation"
},
{
"id": "efbc2aedb0b53499cb2e72e21aa6c74789dae5d5b8e0195657cc95f1f5509b02",
"body": "subscription TripsBooked { tripsBooked }",
"name": "TripsBooked",
"type": "subscription"
},
{
"id": "e36bde514d89c67c77502cf15141ea4298d05951aff731bc00bd33dc2d1726d7",
"body": "query LaunchList($cursor: String) { launches(after: $cursor) { __typename cursor hasMore launches { __typename ...LaunchListDetail } } }\nfragment LaunchListDetail on Launch { __typename id site mission { __typename name missionPatch(size: SMALL) } }",
"name": "LaunchList",
"type": "query"
},
{
"id": "fc0763adcfa1b9ae4d3cb5e876beb0a00f66205598c8bf2d401333bba6000024",
"body": "mutation CancelTrip($launchId: ID!) { cancelTrip(launchId: $launchId) { __typename success message launches { __typename id isBooked } } }",
"name": "CancelTrip",
"type": "mutation"
}
]
}
13 changes: 12 additions & 1 deletion final/apollo-codegen-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@
}
}
},
"options" : {
"operationDocumentFormat" : [
"definition",
"operationId"
]
},
"operationManifest" : {
"generateManifestOnCodeGeneration" : true,
"path" : "./RocketReserverAPI/Sources/Operations/persisted-query-manifest.json",
"version" : "persistedQueries"
},
"schemaDownloadConfiguration": {
"downloadMethod": {
"introspection": {
Expand All @@ -40,4 +51,4 @@
"headers": [],
"outputPath": "./graphql/schema.graphqls"
}
}
}