diff --git a/final/RocketReserver.xcodeproj/project.pbxproj b/final/RocketReserver.xcodeproj/project.pbxproj index 3d3c025..39596f3 100644 --- a/final/RocketReserver.xcodeproj/project.pbxproj +++ b/final/RocketReserver.xcodeproj/project.pbxproj @@ -63,6 +63,7 @@ E67B2DEF2C7D02BC0095602B /* UserView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserView.swift; sourceTree = ""; }; E67B2DF12C7D03180095602B /* UserViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserViewModel.swift; sourceTree = ""; }; E67B2DF32C7D27620095602B /* Me.graphql */ = {isa = PBXFileReference; lastKnownFileType = text; path = Me.graphql; sourceTree = ""; }; + E6F3F8F22C87D896002A01EB /* apollo-codegen-config.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "apollo-codegen-config.json"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -99,6 +100,7 @@ 66F96F8E29FAC0D600713B80 = { isa = PBXGroup; children = ( + E6F3F8F22C87D896002A01EB /* apollo-codegen-config.json */, 66D7A53A2A056886009DDB89 /* graphql */, 66F96FCD29FAD2DD00713B80 /* Packages */, 66F96F9929FAC0D600713B80 /* RocketReserver */, diff --git a/final/RocketReserverAPI/Sources/Operations/Mutations/BookTripMutation.graphql.swift b/final/RocketReserverAPI/Sources/Operations/Mutations/BookTripMutation.graphql.swift index ca7105e..b2f30df 100644 --- a/final/RocketReserverAPI/Sources/Operations/Mutations/BookTripMutation.graphql.swift +++ b/final/RocketReserverAPI/Sources/Operations/Mutations/BookTripMutation.graphql.swift @@ -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] diff --git a/final/RocketReserverAPI/Sources/Operations/Mutations/CancelTripMutation.graphql.swift b/final/RocketReserverAPI/Sources/Operations/Mutations/CancelTripMutation.graphql.swift index 64552c2..67de3a7 100644 --- a/final/RocketReserverAPI/Sources/Operations/Mutations/CancelTripMutation.graphql.swift +++ b/final/RocketReserverAPI/Sources/Operations/Mutations/CancelTripMutation.graphql.swift @@ -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 } } }"# )) @@ -67,4 +68,4 @@ public class CancelTripMutation: GraphQLMutation { } } } -} \ No newline at end of file +} diff --git a/final/RocketReserverAPI/Sources/Operations/Mutations/LoginMutation.graphql.swift b/final/RocketReserverAPI/Sources/Operations/Mutations/LoginMutation.graphql.swift index a99a1d3..d04af1d 100644 --- a/final/RocketReserverAPI/Sources/Operations/Mutations/LoginMutation.graphql.swift +++ b/final/RocketReserverAPI/Sources/Operations/Mutations/LoginMutation.graphql.swift @@ -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 } }"# )) @@ -45,4 +46,4 @@ public class LoginMutation: GraphQLMutation { public var token: String? { __data["token"] } } } -} \ No newline at end of file +} diff --git a/final/RocketReserverAPI/Sources/Operations/Queries/LaunchDetailsQuery.graphql.swift b/final/RocketReserverAPI/Sources/Operations/Queries/LaunchDetailsQuery.graphql.swift index 84edb6c..0934542 100644 --- a/final/RocketReserverAPI/Sources/Operations/Queries/LaunchDetailsQuery.graphql.swift +++ b/final/RocketReserverAPI/Sources/Operations/Queries/LaunchDetailsQuery.graphql.swift @@ -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 } }"# )) @@ -89,4 +90,4 @@ public class LaunchDetailsQuery: GraphQLQuery { } } } -} \ No newline at end of file +} diff --git a/final/RocketReserverAPI/Sources/Operations/Queries/LaunchListQuery.graphql.swift b/final/RocketReserverAPI/Sources/Operations/Queries/LaunchListQuery.graphql.swift index cccfff8..7b49071 100644 --- a/final/RocketReserverAPI/Sources/Operations/Queries/LaunchListQuery.graphql.swift +++ b/final/RocketReserverAPI/Sources/Operations/Queries/LaunchListQuery.graphql.swift @@ -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] @@ -77,4 +78,4 @@ public class LaunchListQuery: GraphQLQuery { } } } -} \ No newline at end of file +} diff --git a/final/RocketReserverAPI/Sources/Operations/Queries/MeQuery.graphql.swift b/final/RocketReserverAPI/Sources/Operations/Queries/MeQuery.graphql.swift index dc5cd2c..012f776 100644 --- a/final/RocketReserverAPI/Sources/Operations/Queries/MeQuery.graphql.swift +++ b/final/RocketReserverAPI/Sources/Operations/Queries/MeQuery.graphql.swift @@ -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] @@ -69,4 +70,4 @@ public class MeQuery: GraphQLQuery { } } } -} \ No newline at end of file +} diff --git a/final/RocketReserverAPI/Sources/Operations/Subscriptions/TripsBookedSubscription.graphql.swift b/final/RocketReserverAPI/Sources/Operations/Subscriptions/TripsBookedSubscription.graphql.swift index 400c85e..2db5980 100644 --- a/final/RocketReserverAPI/Sources/Operations/Subscriptions/TripsBookedSubscription.graphql.swift +++ b/final/RocketReserverAPI/Sources/Operations/Subscriptions/TripsBookedSubscription.graphql.swift @@ -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 }"# )) @@ -23,4 +24,4 @@ public class TripsBookedSubscription: GraphQLSubscription { public var tripsBooked: Int? { __data["tripsBooked"] } } -} \ No newline at end of file +} diff --git a/final/RocketReserverAPI/Sources/Operations/persisted-query-manifest.json b/final/RocketReserverAPI/Sources/Operations/persisted-query-manifest.json new file mode 100644 index 0000000..c17357d --- /dev/null +++ b/final/RocketReserverAPI/Sources/Operations/persisted-query-manifest.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/final/apollo-codegen-config.json b/final/apollo-codegen-config.json index 202bd7c..6551985 100644 --- a/final/apollo-codegen-config.json +++ b/final/apollo-codegen-config.json @@ -25,6 +25,17 @@ } } }, + "options" : { + "operationDocumentFormat" : [ + "definition", + "operationId" + ] + }, + "operationManifest" : { + "generateManifestOnCodeGeneration" : true, + "path" : "./RocketReserverAPI/Sources/Operations/persisted-query-manifest.json", + "version" : "persistedQueries" + }, "schemaDownloadConfiguration": { "downloadMethod": { "introspection": { @@ -40,4 +51,4 @@ "headers": [], "outputPath": "./graphql/schema.graphqls" } -} \ No newline at end of file +}