1. inisialisasi backend golang
This commit is contained in:
34
backend/graph/graphqls/staff.graphqls
Normal file
34
backend/graph/graphqls/staff.graphqls
Normal file
@@ -0,0 +1,34 @@
|
||||
# model staff
|
||||
type Staff {
|
||||
staff_id: ID!
|
||||
nip: String!
|
||||
name: String!
|
||||
email: String!
|
||||
phone_number: String
|
||||
is_active: String
|
||||
is_login: Boolean
|
||||
token: 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
|
||||
}
|
||||
|
||||
# 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 {
|
||||
generateToken(email: String!, id_google_sign_in:String!): TokenResponse!
|
||||
loginAttendance(email:String!, id_google_sign_in:String!) : Staff!
|
||||
}
|
||||
Reference in New Issue
Block a user