Authentication
githubAuth
Authenticate a user via GitHub OAuth2.accessToken(String!): GitHub OAuth2 access token
ok(Boolean!): Success statusmessage(String!): Human-readable messageuser(AuthUserNode): The authenticated user (if successful)
"GitHub authentication request failed.": Invalid or expired token"Verified primary email is required on your GitHub account.": No verified email found
logoutUser
Log out the current authenticated user.ok(Boolean!): Success statusmessage(String): Human-readable message
API Keys
createApiKey
Create a new API key for the authenticated user. Authentication: Requiredname(String!): Name for the API keyexpiresAt(DateTime!): Expiration date (must be in the future)
ok(Boolean!): Success statuscode(String): Result code (SUCCESS, INVALID_NAME, INVALID_DATE, LIMIT_REACHED, ERROR)message(String): Human-readable messageapiKey(ApiKeyNode): The created API key metadatarawKey(String): The actual API key (only returned once!)
rawKey immediately - it cannot be retrieved again!
Errors:
INVALID_NAME: Name is empty or too longINVALID_DATE: Expiration date is in the pastLIMIT_REACHED: User has reached the maximum number of active API keys
revokeApiKey
Revoke an existing API key. Authentication: Requireduuid(UUID!): UUID of the API key to revoke
ok(Boolean!): Success statuscode(String): Result code (SUCCESS, NOT_FOUND)message(String): Human-readable message
NOT_FOUND: API key doesn’t exist or doesn’t belong to the user
Mentorship Programs
createProgram
Create a new mentorship program. The authenticated user becomes the owner. Authentication: RequiredinputData(CreateProgramInput!):name(String!): Program namedescription(String!): Program descriptionmenteesLimit(Int!): Maximum number of menteesstartedAt(DateTime!): Start dateendedAt(DateTime!): End datedomains(List[String]!): Domains listtags(List[String]!): Tags list
"End date must be after start date.": Invalid date range
updateProgram
Update an existing mentorship program. Only admins can update. Authentication: RequiredinputData(UpdateProgramInput!):key(String!): Program key to updatename(String): New program namedescription(String): New descriptionmenteesLimit(Int): New mentee limitstartedAt(DateTime): New start dateendedAt(DateTime): New end datedomains(List[String]): New domains listtags(List[String]): New tags liststatus(ProgramStatusEnum): New status (DRAFT, PUBLISHED, ARCHIVED)adminLogins(List[String]): GitHub logins of admins
"Program with key 'xxx' not found.": Program doesn’t exist"You must be an admin of this program to update it.": Permission denied"GitHub user 'xxx' not found.": Invalid admin login
updateProgramStatus
Update only the status of a program. Authentication: RequiredinputData(UpdateProgramStatusInput!):key(String!): Program keystatus(ProgramStatusEnum!): New status
Mentorship Modules
createModule
Create a new mentorship module within a program. User must be a program admin. Authentication: RequiredinputData(CreateModuleInput!):programKey(String!): Parent program keyname(String!): Module namedescription(String!): Module descriptionprojectId(Int!): OWASP project IDexperienceLevel(ExperienceLevelEnum!): BEGINNER, INTERMEDIATE, or ADVANCEDstartedAt(DateTime!): Start dateendedAt(DateTime!): End datedomains(List[String]!): Domains listlabels(List[String]!): GitHub labelstags(List[String]!): Tags listmentorLogins(List[String]): GitHub logins of mentors
"Module start date cannot be before program start date.": Invalid date range"Module end date cannot be after program end date.": Invalid date range
updateModule
Update an existing module. User must be a program admin or module mentor. Authentication: RequireddeleteModule
Delete a module. User must be a program admin. Authentication: RequiredprogramKey(String!): Program keymoduleKey(String!): Module key to delete
assignIssueToUser
Assign a GitHub issue to a user within a module. Only mentors can assign. Authentication: RequiredmoduleKey(String!): Module keyprogramKey(String!): Program keyissueNumber(Int!): GitHub issue numberuserLogin(String!): GitHub login of user to assign
"Only mentors of this module can assign issues.": Permission denied"Assignee not found.": User doesn’t exist"Issue not found in this module.": Issue doesn’t exist
unassignIssueFromUser
Unassign a GitHub issue from a user. Only mentors can unassign. Authentication: RequiredsetTaskDeadline
Set a deadline for an assigned issue. Only mentors can set deadlines. Authentication: RequiredmoduleKey(String!): Module keyprogramKey(String!): Program keyissueNumber(Int!): GitHub issue numberdeadlineAt(DateTime!): Deadline date
"Cannot set deadline: issue has no assignees.": Issue must be assigned first"Deadline cannot be in the past.": Invalid deadline date
clearTaskDeadline
Clear the deadline for an assigned issue. Only mentors can clear deadlines. Authentication: RequiredUsing Variables
You can use variables to make mutations more dynamic and reusable:Error Handling
Mutations return errors in two ways:Result Object Errors
Many mutations return a result object withok, code, and message fields:
GraphQL Errors
Permission and validation errors are returned in theerrors array: