Teachers
Query staff and teacher records — list, search, and get by ID
Teachers
Access staff and teacher records for your school. All queries require authentication and return only teachers belonging to your assigned school.
List Teachers
query {
teachers(limit: 20, offset: 0) {
id
username
fullName
empPosition
status
statusText
}
}Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | Int | 20 | Maximum number of results |
offset | Int | 0 | Number of results to skip (for pagination) |
search | String | — | Search across username, firstname, lastname, email, mobileNo, citizenId |
username | String | — | Filter by username (partial match) |
firstname | String | — | Filter by first name (partial match) |
lastname | String | — | Filter by last name (partial match) |
email | String | — | Filter by email (partial match) |
mobileNo | String | — | Filter by mobile number |
citizenId | String | — | Filter by citizen ID |
status | Int | — | Filter by status code |
Search Teachers
query {
teachers(search: "สมศรี", limit: 10) {
id
fullName
empPosition
teachGroup
}
}Get Teacher by ID
query {
teacher(id: 42) {
id
username
email
fullName
empNo
empPosition
teachGroup
gender
mobileNo
status
statusText
takecare
imageURI
}
}Teacher Fields
| Field | Type | Description |
|---|---|---|
id | Int | Unique teacher ID |
username | String | Username |
email | String | Email address |
status | Int | Status code |
statusText | String | Status in Thai text (computed) |
type | Int | Teacher type |
title | String | Thai title |
firstname | String | First name |
lastname | String | Last name |
fullName | String | Full name with title (computed) |
mobileNo | String | Mobile phone number |
empNo | String | Employee number |
empPosition | String | Employee position |
teachGroup | String | Teaching group |
gender | String | Gender |
profilePic | String | Profile picture filename |
imageURI | String | Full profile image URL (computed) |
takecare | String | Homeroom class for active semester (computed) |
visitSummary | VisitStats | Aggregate home-visit counts for the students in this teacher's classrooms. Takes an optional semesterId argument; defaults to the active semester. |
Visit Summary for an Advisor Teacher
Fetch the home-visit coverage for all students in the classrooms this teacher is assigned to — useful for showing an advisor "how many of my kids have been visited".
query {
teacher(id: 42) {
id
fullName
takecare
visitSummary {
total
visited
notVisited
problem
normal
}
}
}Pass semesterId explicitly to scope the summary to a different semester:
query {
teacher(id: 42) {
visitSummary(semesterId: 78) {
total
visited
problem
}
}
}Status Codes
| Code | Thai | English |
|---|---|---|
| -2 | ย้ายออก | Transferred out |
| -1 | เกษียณ | Retired |
| 0 | ไม่ใช้งาน | Inactive |
| 1 | ลาออก | Resigned |
| 2 | พักงาน | On leave |
| 10 | ปกติ | Active |
Filter by Status
# Get only active teachers
query {
teachers(status: 10, limit: 50) {
id
fullName
empPosition
}
}
# Get retired teachers
query {
teachers(status: -1) {
id
fullName
}
}