Skip to main content

UserSchema

File

GraphQL Schema

Summary

This file contains the GraphQL schema types for the KA API.

Description

This file exists to reduce code duplication and because GraphQL operates using schemas.

Khan Academy's safelisted GraphQL queries will usually not request any schema entirely so TypeScript's Pick and Omit utility types may come in handy.

Type parameters

AvatarData = AvatarSchema

ProfileData = ProfileSchema

ListProgramsData = ListProgramsSchema

Properties

__typename

__typename: "User"

Source

src/types/schema.ts:36


actorHasUserScopedPermission

actorHasUserScopedPermission: boolean

Source

src/types/schema.ts:37


authEmails

authEmails: null | string[]

Source

src/types/schema.ts:38


autocontinueOn

autocontinueOn: null | boolean

Source

src/types/schema.ts:39


avatar

avatar: AvatarData

Source

src/types/schema.ts:40


badgeCounts

badgeCounts: string

Source

src/types/schema.ts:41


bio

bio: string

Source

src/types/schema.ts:42


birthMonthYear

birthMonthYear: unknown

Source

src/types/schema.ts:43


canAccessDistrictsHomepage

canAccessDistrictsHomepage: boolean

Source

src/types/schema.ts:44


canHellban

canHellban: null | boolean

Source

src/types/schema.ts:45


canMessageUsers

canMessageUsers: null | boolean

Source

src/types/schema.ts:46


canModifyCoaches

canModifyCoaches: null | boolean

Source

src/types/schema.ts:47


countVideosCompleted

countVideosCompleted: number

Source

src/types/schema.ts:48


email

email: null | string

Source

src/types/schema.ts:49


gaUserId

gaUserId: null | string

Source

src/types/schema.ts:50


hasAccessToAIGuideDev

hasAccessToAIGuideDev: boolean

Source

src/types/schema.ts:51


hasAccessToAIGuideTeacher

hasAccessToAIGuideTeacher: boolean

Source

src/types/schema.ts:52


hasChildren

hasChildren: null | boolean

Source

src/types/schema.ts:53


hasClasses

hasClasses: null | boolean

Source

src/types/schema.ts:54


hasCoach

hasCoach: null | boolean

Source

src/types/schema.ts:55


hasStudents

hasStudents: null | boolean

Source

src/types/schema.ts:56


hasUnresolvedInvitations

hasUnresolvedInvitations: null | boolean

Source

src/types/schema.ts:57


hideVisual

hideVisual: null | boolean

Source

src/types/schema.ts:58


homepageUrl

homepageUrl: null | string

Source

src/types/schema.ts:59


id

id: null | `kaid_${number}`

Same as KAID unless the user is anonymous

Source

src/types/schema.ts:63


includesDistrictOwnedData

includesDistrictOwnedData: boolean

Source

src/types/schema.ts:64


includesK4dDistrictOwnedData

includesK4dDistrictOwnedData: boolean

Source

src/types/schema.ts:65


includesKmapDistrictOwnedData

includesKmapDistrictOwnedData: boolean

Source

src/types/schema.ts:66


isAIGuideEnabled

isAIGuideEnabled: boolean

Source

src/types/schema.ts:67


isActor

isActor: boolean

Source

src/types/schema.ts:68


isChild

isChild: null | boolean

Source

src/types/schema.ts:69


isCoachedByActor

isCoachedByActor: boolean

Source

src/types/schema.ts:70


isCoachingLoggedInUser

isCoachingLoggedInUser: boolean

Source

src/types/schema.ts:71


isCreator

isCreator: null | boolean

Source

src/types/schema.ts:72


isCurator

isCurator: null | boolean

Source

src/types/schema.ts:73


isDataCollectible

isDataCollectible: null | boolean

Source

src/types/schema.ts:74


isDeveloper

isDeveloper: null | boolean

Source

src/types/schema.ts:75


isFormalTeacher

isFormalTeacher: null | boolean

Source

src/types/schema.ts:76


isK4dStudent

isK4dStudent: null | boolean

Source

src/types/schema.ts:77


isKmapStudent

isKmapStudent: null | boolean

Source

src/types/schema.ts:78


isMidsignupPhantom

isMidsignupPhantom: boolean

Source

src/types/schema.ts:79


isModerator

isModerator: null | boolean

Source

src/types/schema.ts:80


isOrphan

isOrphan: null | boolean

Source

src/types/schema.ts:81


isParent

isParent: null | boolean

Source

src/types/schema.ts:82


isPhantom

isPhantom: boolean

Source

src/types/schema.ts:83


isPublisher

isPublisher: null | boolean

Source

src/types/schema.ts:84


isSatStudent

isSatStudent: null | boolean

Source

src/types/schema.ts:85


isSelf

isSelf: boolean

Source

src/types/schema.ts:86


isTeacher

isTeacher: null | boolean

Source

src/types/schema.ts:87


joined

joined: string

Source

src/types/schema.ts:88


kaid

kaid: "" | `kaid_${number}`

Will always be a string if requested in the GraphQL query. Defaults to empty string ('') for anonymous users.

Source

src/types/schema.ts:92


key

key: null | string

Source

src/types/schema.ts:93


lastLoginCountry

lastLoginCountry: null | string

Source

src/types/schema.ts:94


muteVideos

muteVideos: null | boolean

Source

src/types/schema.ts:95


newNotificationCount

newNotificationCount: null | number

Source

src/types/schema.ts:96


nickname

nickname: null | string

Source

src/types/schema.ts:97


noColorInVideos

noColorInVideos: null | boolean

Source

src/types/schema.ts:98


pendingEmailVerifications

pendingEmailVerifications: null | PendingEmailVerificationSchema[]

Source

src/types/schema.ts:99


points

points: number

Source

src/types/schema.ts:100


preferredKaLocale

preferredKaLocale: null | LocaleSchema

Source

src/types/schema.ts:101


prefersReducedMotion

prefersReducedMotion: null | boolean

Source

src/types/schema.ts:102


profile

profile: ProfileData

Source

src/types/schema.ts:103


profileRoot

profileRoot: null | `/profile/${string}/`

Defaults to null for anonymous users.

Source

src/types/schema.ts:107


programs

programs: ListProgramsData

Source

src/types/schema.ts:108


qualarooId

qualarooId: null | `kaid_${number}` | `_gae_bingo_random:${string}`

Either Qualaroo ID or KAID

https://github.com/kamens/gae_bingo

Deprecated

Since 2023-04-24

Source

src/types/schema.ts:116


region

region: unknown

Source

src/types/schema.ts:117


shouldShowAgeCheck

shouldShowAgeCheck: null | boolean

Source

src/types/schema.ts:118


showCaptions

showCaptions: null | boolean

Source

src/types/schema.ts:119


signupDataIfUnverified

signupDataIfUnverified: unknown

Source

src/types/schema.ts:120


soundOn

soundOn: null | boolean

Source

src/types/schema.ts:121


tosAccepted

tosAccepted: null | boolean

Source

src/types/schema.ts:122


transferAuthToken

transferAuthToken: string

Source

src/types/schema.ts:123


underAgeGate

underAgeGate: unknown

Source

src/types/schema.ts:124


userId

userId: `kaid_${number}` | `http://googleid.khanacademy.org/$\{number\}\`

Either Google ID or KAID

Source

src/types/schema.ts:128


userSummaryIsVisibleToActor

userSummaryIsVisibleToActor: boolean

Source

src/types/schema.ts:129


username

username: string

Source

src/types/schema.ts:130