1. inisialisasi backend golang

This commit is contained in:
sindhu
2024-01-10 16:23:04 +07:00
parent 0464b1629e
commit a2defaaaa8
18 changed files with 6276 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
# GraphQL schema example
#
# https://gqlgen.com/getting-started/
type Todo {
id: ID!
text: String!
done: Boolean!
user: User!
}
type User {
id: ID!
name: String!
}
type Query {
todos: [Todo!]!
}
input NewTodo {
text: String!
userId: String!
}
type Mutation {
createTodo(input: NewTodo!): Todo!
}

View 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!
}