Skip to content

Instantly share code, notes, and snippets.

@fecori
Created April 8, 2019 16:46
Show Gist options
  • Select an option

  • Save fecori/f51a6b95ebeacb316d16caa1a4f01425 to your computer and use it in GitHub Desktop.

Select an option

Save fecori/f51a6b95ebeacb316d16caa1a4f01425 to your computer and use it in GitHub Desktop.
Example GraphQL schema
schema {
query: RootQueryType
mutation: RootMutationType
}
type RootQueryType {
currentUser: CurrentUser
billing: Billing
}
type RootMutationType {
registerUser(email: String!, invitationToken: String, password: String!): CurrentUser
registerCompany(name: String!): Company
resetPassword(password: String!, resetPasswordToken: String!): CurrentUser
login(email: String!, password: String!): CurrentUser
logout: CurrentUser
updateBilling(input: UpdateBillingInput!): Billing
}
type CurrentUser {
id: ID
authToken: String
firstName: String
lastName: String
email: String
mobile: String
isOwner: Boolean
company: Company
}
type Company {
id: ID
name: String
}
type Billing {
trialDaysLeft: Int
plan: BillingPlan
card: Card
nextPaymentDue: String
}
enum BillingPlan {
FREE
SOLO
TEAM
}
type Card {
lastFourDigits: String
type: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment