Skip to main content

GraphQL mutations

Mutations make changes. Every mutation returns success and errors, plus the affected record where relevant. Most member mutations act on the signed-in user; when they accept a user_id/id, it must match the current user.

Signing in

  • authStartSignIn(email) — sends a one-time password and a magic link to the email if an account exists. Returns an otpId. (Always reports success, to avoid revealing whether an email is registered.)
  • authSignInWithMagicLink(magicLinkSignature) — signs in from a magic link; returns an access token and whether the user is onboarded.
  • authSignInWithOtp(id, otp) — signs in with the OTP; returns an access token.
  • createUserJwt(sessionId, sessionNonce) / revokeUserJwt(token) — create or revoke a user JWT (create requires a signed-in user).

Editing your profile

editUser(id, userInput) updates a user (defaults to the current user). userInput accepts:

  • firstName, lastName
  • birthdate, gender, pronouns, raceOrEthnicity
  • countryOfResidence (alpha-2 code)
  • dietaryPreferences, clothingSizes
  • newsletterSubscriptions, topicSubscriptions, unsubscribed
  • customFields

Newsletter and topic subscriptions are merged with existing values, so you can update one without clearing the others.

Education and employment

  • addSchoolEnrollment / editSchoolEnrollment / deleteSchoolEnrollment — manage school history. Enrollment input: schoolId, startsOn, endsOn, major, current.
  • addEmployment / editEmployment / deleteEmployment — manage work history. Employment input: companyId, title, startsOn, endsOn, current.

OAuth

oauthCreateAccessGrant(clientId, redirectUri, scope, automatic) — create an OAuth access grant for an application (requires a signed-in user). Validates the redirect URI, scope, and client ID.

Uploads

createPresignUrl(fileName, fileType, fileSize) — get a presigned S3 URL to upload an image (logo). Accepts PNG, WebP, SVG, JPG/JPEG up to 2 MB; returns an uploadUrl (PUT, short-lived) and a url (GET).