enum IdentifierType { email employeeId customId } type User { id: ID! userId: ID! displayName: String email: String externalId: String employeeId: String customId: String identifierType: IdentifierType identifierValue: String status: String } type Course { id: ID! title: String description: String publishedVersionId: ID status: String } type Enrollment { id: ID! userId: ID! courseId: ID! externalId: String versionId: ID status: String progressPercent: Float completedAt: String } type Progress { enrollmentId: ID! state: String status: String percentComplete: Float completedAt: String } type Completion { id: ID! enrollmentId: ID! courseId: ID! userId: ID! externalId: String versionId: ID completedAt: String passed: Boolean certificateId: ID } type UserPage { data: [User!]! nextCursor: String } type CoursePage { data: [Course!]! nextCursor: String } type EnrollmentPage { data: [Enrollment!]! nextCursor: String } type ProgressPage { data: [Progress!]! nextCursor: String } type CompletionPage { data: [Completion!]! nextCursor: String } input UserInput { displayName: String email: String externalId: String employeeId: String customId: String identifierType: IdentifierType identifierValue: String } input UserPatch { displayName: String email: String externalId: String employeeId: String customId: String identifierType: IdentifierType identifierValue: String status: String } input EnrollmentInput { courseId: ID! userId: ID! } type Query { users(limit: Int = 25, cursor: String): UserPage! user(id: ID, identifier: String): User courses(limit: Int = 25, cursor: String): CoursePage! course(id: ID!): Course enrollments( limit: Int = 25 cursor: String courseId: ID userId: ID status: String ): EnrollmentPage! enrollment(id: ID!): Enrollment progress(id: ID!): Progress progresses(limit: Int = 25, cursor: String, courseId: ID, userId: ID): ProgressPage! completions(limit: Int = 25, cursor: String): CompletionPage! completion(id: ID!): Completion } type Mutation { createUser(input: UserInput!): User! updateUser(id: ID!, input: UserPatch!): User! upsertUser(identifier: String!, input: UserInput!): User! createEnrollment(input: EnrollmentInput!): Enrollment! cancelEnrollment(id: ID!): Boolean! }