Files
be_absensi_sas/backend/graph/graphqls/staff.graphqls
2024-01-25 07:32:06 +07:00

47 lines
943 B
GraphQL

# model staff
type Staff {
staff_id: ID!
nip: String!
name: String!
email: String!
phone_number: String
company_id: ID!
company_name: String
is_active: String
is_login: String
token: String
expired: String
id_google_sign_in: String!
display_name_google_sign_in: String
created_at: String
last_updated_at: String
}
# model token response ketika login
type TokenResponse {
token: String
message: String
}
# logout response
type LogoutResponse {
status:String
message:String
}
# query search
extend type Query {
searchStaffByEmail(email: String!): Staff!
staffGetByStaffId(staff_id: ID!): Staff!
staffListBySearch(search:String, page:Int, maxPerPage: Int): [Staff!]!
}
# mutation untuk perubahan data
extend type Mutation {
# login
loginAttendance(email:String!, id_google_sign_in:String!) : Staff!
# logout
logoutAttendance(email:String!, id_google_sign_in:String!) : LogoutResponse!
}