Created
March 17, 2019 06:35
-
-
Save jbruni/723e6144aa404412bd89f8d90eda6dca to your computer and use it in GitHub Desktop.
Apollo GraphQL fullstack tutorial Schema
This file contains hidden or 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
type Query { | |
launches( | |
pageSize: Int | |
after: String | |
): LaunchConnection! | |
launch(id: ID!): Launch | |
me: User | |
} | |
type Mutation { | |
bookTrips(launchIds: [ID]!): TripUpdateResponse! | |
cancelTrip(launchId: ID!): TripUpdateResponse! | |
login(email: String): String # login token | |
} | |
type TripUpdateResponse { | |
success: Boolean! | |
message: String | |
launches: [Launch] | |
} | |
type LaunchConnection { | |
cursor: String! | |
hasMore: Boolean! | |
launches: [Launch]! | |
} | |
type Launch { | |
id: ID! | |
site: String | |
mission: Mission | |
rocket: Rocket | |
isBooked: Boolean! | |
} | |
type Rocket { | |
id: ID! | |
name: String | |
type: String | |
} | |
type User { | |
id: ID! | |
email: String! | |
trips: [Launch]! | |
} | |
type Mission { | |
name: String | |
missionPatch(size: PatchSize): String | |
} | |
enum PatchSize { | |
SMALL | |
LARGE | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Taken from https://github.com/apollographql/fullstack-tutorial/blob/master/final/server/src/schema.js