OBJECT

Mutation

link GraphQL Schema definition

  • type Mutation {
  • success: Boolean
  • error: String
  • session: SessionType
  • courses: [CourseType]
  • Output: [CourseType]
  • course: CourseType
  • organization: OrganizationType
  • event: EventType
  • # Register user with fields defined in the settings.
  • #
  • # If the email field of the user model is part of the
  • # registration fields (default), check if there is
  • # no user with that email or as a secondary email.
  • #
  • # If it exists, it does not register the user,
  • # even if the email field is not defined as unique
  • # (default of the default django user model).
  • #
  • # When creating the user, it also creates a `UserStatus`
  • # related to that user, making it possible to track
  • # if the user is archived, verified and has a secondary
  • # email.
  • #
  • # Send account verification email.
  • #
  • # If allowed to not verified users login, return token.
  • #
  • # Arguments
  • # email: [Not documented]
  • # username: [Not documented]
  • # firstName: [Not documented]
  • # lastName: [Not documented]
  • # isStaff: [Not documented]
  • # password1: [Not documented]
  • # password2: [Not documented]
  • register(
  • email: String!,
  • username: String!,
  • firstName: String!,
  • lastName: String!,
  • isStaff: String!,
  • password1: String!,
  • password2: String!
  • ): Register
  • # Verify user account.
  • #
  • # Receive the token that was sent by email.
  • # If the token is valid, make the user verified
  • # by making the `user.status.verified` field true.
  • #
  • # Arguments
  • # token: [Not documented]
  • verifyAccount(token: String!): VerifyAccount
  • # Sends activation email.
  • #
  • # It is called resend because theoretically
  • # the first activation email was sent when
  • # the user registered.
  • #
  • # If there is no user with the requested email,
  • # a successful response is returned.
  • #
  • # Arguments
  • # email: [Not documented]
  • resendActivationEmail(email: String!): ResendActivationEmail
  • # Send password reset email.
  • #
  • # For non verified users, send an activation
  • # email instead.
  • #
  • # Accepts both primary and secondary email.
  • #
  • # If there is no user with the requested email,
  • # a successful response is returned.
  • #
  • # Arguments
  • # email: [Not documented]
  • sendPasswordResetEmail(email: String!): SendPasswordResetEmail
  • # Change user password without old password.
  • #
  • # Receive the token that was sent by email.
  • #
  • # If token and new passwords are valid, update
  • # user password and in case of using refresh
  • # tokens, revoke all of them.
  • #
  • # Also, if user has not been verified yet, verify it.
  • #
  • # Arguments
  • # token: [Not documented]
  • # newPassword1: [Not documented]
  • # newPassword2: [Not documented]
  • passwordReset(
  • token: String!,
  • newPassword1: String!,
  • newPassword2: String!
  • ): PasswordReset
  • # Set user password - for passwordless registration
  • #
  • # Receive the token that was sent by email.
  • #
  • # If token and new passwords are valid, set
  • # user password and in case of using refresh
  • # tokens, revoke all of them.
  • #
  • # Also, if user has not been verified yet, verify it.
  • #
  • # Arguments
  • # token: [Not documented]
  • # newPassword1: [Not documented]
  • # newPassword2: [Not documented]
  • passwordSet(token: String!, newPassword1: String!, newPassword2: String!): PasswordSet
  • # Change account password when user knows the old password.
  • #
  • # A new token and refresh token are sent. User must be verified.
  • #
  • # Arguments
  • # oldPassword: [Not documented]
  • # newPassword1: [Not documented]
  • # newPassword2: [Not documented]
  • passwordChange(
  • oldPassword: String!,
  • newPassword1: String!,
  • newPassword2: String!
  • ): PasswordChange
  • # Update user model fields, defined on settings.
  • #
  • # User must be verified.
  • #
  • # Arguments
  • # firstName: [Not documented]
  • # lastName: [Not documented]
  • updateAccount(firstName: String, lastName: String): UpdateAccount
  • # Archive account and revoke refresh tokens.
  • #
  • # User must be verified and confirm password.
  • #
  • # Arguments
  • # password: [Not documented]
  • archiveAccount(password: String!): ArchiveAccount
  • # Delete account permanently or make `user.is_active=False`.
  • #
  • # The behavior is defined on settings.
  • # Anyway user refresh tokens are revoked.
  • #
  • # User must be verified and confirm password.
  • #
  • # Arguments
  • # password: [Not documented]
  • deleteAccount(password: String!): DeleteAccount
  • # Send activation to secondary email.
  • #
  • # User must be verified and confirm password.
  • #
  • # Arguments
  • # email: [Not documented]
  • # password: [Not documented]
  • sendSecondaryEmailActivation(
  • email: String!,
  • password: String!
  • ): SendSecondaryEmailActivation
  • # Verify user secondary email.
  • #
  • # Receive the token that was sent by email.
  • # User is already verified when using this mutation.
  • #
  • # If the token is valid, add the secondary email
  • # to `user.status.secondary_email` field.
  • #
  • # Note that until the secondary email is verified,
  • # it has not been saved anywhere beyond the token,
  • # so it can still be used to create a new account.
  • # After being verified, it will no longer be available.
  • #
  • # Arguments
  • # token: [Not documented]
  • verifySecondaryEmail(token: String!): VerifySecondaryEmail
  • # Swap between primary and secondary emails.
  • #
  • # Require password confirmation.
  • #
  • # Arguments
  • # password: [Not documented]
  • swapEmails(password: String!): SwapEmails
  • # Remove user secondary email.
  • #
  • # Require password confirmation.
  • #
  • # Arguments
  • # password: [Not documented]
  • removeSecondaryEmail(password: String!): RemoveSecondaryEmail
  • # Obtain JSON web token for given user.
  • #
  • # Allow to perform login with different fields,
  • # and secondary email if set. The fields are
  • # defined on settings.
  • #
  • # Not verified users can login by default. This
  • # can be changes on settings.
  • #
  • # If user is archived, make it unarchive and
  • # return `unarchiving=True` on output.
  • #
  • # Arguments
  • # password: [Not documented]
  • # email: [Not documented]
  • # username: [Not documented]
  • tokenAuth(password: String!, email: String, username: String): ObtainJSONWebToken
  • # Same as `grapgql_jwt` implementation, with standard output.
  • #
  • # Arguments
  • # token: [Not documented]
  • verifyToken(token: String!): VerifyToken
  • # Same as `grapgql_jwt` implementation, with standard output.
  • #
  • # Arguments
  • # refreshToken: [Not documented]
  • refreshToken(refreshToken: String!): RefreshToken
  • # Same as `grapgql_jwt` implementation, with standard output.
  • #
  • # Arguments
  • # refreshToken: [Not documented]
  • revokeToken(refreshToken: String!): RevokeToken
  • _debug: DjangoDebug
  • # Arguments
  • # description: [Not documented]
  • # errorSeverity: [Not documented]
  • # eventCategory: [Not documented]
  • # sessionId: [Not documented]
  • # vrObject: [Not documented]
  • eventMutation(
  • description: String,
  • errorSeverity: Int,
  • eventCategory: Int,
  • sessionId: Int,
  • vrObject: String
  • ): AddEvent
  • # Arguments
  • # avatar: [Not documented]
  • # id: [Not documented]
  • # name: [Not documented]
  • organizationMutation(avatar: String!, id: ID, name: String!): OrganizationMutation
  • # Arguments
  • # description: [Not documented]
  • # id: [Not documented]
  • # name: [Not documented]
  • # orgId: [Not documented]
  • addCourse(description: String, id: ID, name: String!, orgId: ID!): AddCourseMutation
  • # Arguments
  • # data: [Not documented]
  • addCourses(data: [CourseInput]): [CourseType]
  • # Arguments
  • # data: [Not documented]
  • updateCourses(data: [CourseInput]): [CourseType]
  • # Arguments
  • # data: [Not documented]
  • addTrainings(data: [TrainingInput]): [TrainingType]
  • # Arguments
  • # data: [Not documented]
  • updateTrainings(data: [TrainingInput]): [TrainingType]
  • # Arguments
  • # id: [Not documented]
  • # isComplete: [Not documented]
  • closeSession(id: Int!, isComplete: Boolean!): CloseSessionMutation
  • # Arguments
  • # category: [Not documented]
  • # name: [Not documented]
  • # totalSteps: [Not documented]
  • # trainingId: [Not documented]
  • # userId: [Not documented]
  • createSession(
  • category: String!,
  • name: String!,
  • totalSteps: Int!,
  • trainingId: Int!,
  • userId: Int!
  • ): CreateSessionMutation
  • # Arguments
  • # courseIds: [Not documented]
  • # orgId: [Not documented]
  • # trainingIds: [Not documented]
  • # username: [Not documented]
  • registerUserOrgInfo(
  • courseIds: [Int],
  • orgId: Int!,
  • trainingIds: [Int],
  • username: String!
  • ): RegisterUserOrgInfo
  • # Arguments
  • # courseIds: [Not documented]
  • # firstName: [Not documented]
  • # isStaff: [Not documented]
  • # lastName: [Not documented]
  • # trainingIds: [Not documented]
  • # userId: [Not documented]
  • # username: [Not documented]
  • updateUser(
  • courseIds: [Int],
  • firstName: String,
  • isStaff: Boolean,
  • lastName: String,
  • trainingIds: [Int],
  • userId: Int,
  • username: String
  • ): UpdateUserMutation
  • # Arguments
  • # name: [Not documented]
  • # trainingId: [Not documented]
  • createQuiz(name: String!, trainingId: Int!): CreateQuizMutation
  • }

link Require by

This element is not required by anyone