|
|
|
|
@@ -59,6 +59,8 @@ type ComplexityRoot struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Staff struct {
|
|
|
|
|
CompanyID func(childComplexity int) int
|
|
|
|
|
CompanyName func(childComplexity int) int
|
|
|
|
|
CreatedAt func(childComplexity int) int
|
|
|
|
|
DisplayNameGoogleSignIn func(childComplexity int) int
|
|
|
|
|
Email func(childComplexity int) int
|
|
|
|
|
@@ -189,6 +191,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|
|
|
|
|
|
|
|
|
return e.complexity.Query.Todos(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "Staff.company_id":
|
|
|
|
|
if e.complexity.Staff.CompanyID == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.Staff.CompanyID(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "Staff.company_name":
|
|
|
|
|
if e.complexity.Staff.CompanyName == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.Staff.CompanyName(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "Staff.created_at":
|
|
|
|
|
if e.complexity.Staff.CreatedAt == nil {
|
|
|
|
|
break
|
|
|
|
|
@@ -478,6 +494,8 @@ type Staff {
|
|
|
|
|
name: String!
|
|
|
|
|
email: String!
|
|
|
|
|
phone_number: String
|
|
|
|
|
company_id: ID!
|
|
|
|
|
company_name: String
|
|
|
|
|
is_active: String
|
|
|
|
|
is_login: String
|
|
|
|
|
token: String
|
|
|
|
|
@@ -781,6 +799,10 @@ func (ec *executionContext) fieldContext_Mutation_loginAttendance(ctx context.Co
|
|
|
|
|
return ec.fieldContext_Staff_email(ctx, field)
|
|
|
|
|
case "phone_number":
|
|
|
|
|
return ec.fieldContext_Staff_phone_number(ctx, field)
|
|
|
|
|
case "company_id":
|
|
|
|
|
return ec.fieldContext_Staff_company_id(ctx, field)
|
|
|
|
|
case "company_name":
|
|
|
|
|
return ec.fieldContext_Staff_company_name(ctx, field)
|
|
|
|
|
case "is_active":
|
|
|
|
|
return ec.fieldContext_Staff_is_active(ctx, field)
|
|
|
|
|
case "is_login":
|
|
|
|
|
@@ -918,6 +940,10 @@ func (ec *executionContext) fieldContext_Query_searchStaffByEmail(ctx context.Co
|
|
|
|
|
return ec.fieldContext_Staff_email(ctx, field)
|
|
|
|
|
case "phone_number":
|
|
|
|
|
return ec.fieldContext_Staff_phone_number(ctx, field)
|
|
|
|
|
case "company_id":
|
|
|
|
|
return ec.fieldContext_Staff_company_id(ctx, field)
|
|
|
|
|
case "company_name":
|
|
|
|
|
return ec.fieldContext_Staff_company_name(ctx, field)
|
|
|
|
|
case "is_active":
|
|
|
|
|
return ec.fieldContext_Staff_is_active(ctx, field)
|
|
|
|
|
case "is_login":
|
|
|
|
|
@@ -1001,6 +1027,10 @@ func (ec *executionContext) fieldContext_Query_staffGetByStaffId(ctx context.Con
|
|
|
|
|
return ec.fieldContext_Staff_email(ctx, field)
|
|
|
|
|
case "phone_number":
|
|
|
|
|
return ec.fieldContext_Staff_phone_number(ctx, field)
|
|
|
|
|
case "company_id":
|
|
|
|
|
return ec.fieldContext_Staff_company_id(ctx, field)
|
|
|
|
|
case "company_name":
|
|
|
|
|
return ec.fieldContext_Staff_company_name(ctx, field)
|
|
|
|
|
case "is_active":
|
|
|
|
|
return ec.fieldContext_Staff_is_active(ctx, field)
|
|
|
|
|
case "is_login":
|
|
|
|
|
@@ -1084,6 +1114,10 @@ func (ec *executionContext) fieldContext_Query_staffListBySearch(ctx context.Con
|
|
|
|
|
return ec.fieldContext_Staff_email(ctx, field)
|
|
|
|
|
case "phone_number":
|
|
|
|
|
return ec.fieldContext_Staff_phone_number(ctx, field)
|
|
|
|
|
case "company_id":
|
|
|
|
|
return ec.fieldContext_Staff_company_id(ctx, field)
|
|
|
|
|
case "company_name":
|
|
|
|
|
return ec.fieldContext_Staff_company_name(ctx, field)
|
|
|
|
|
case "is_active":
|
|
|
|
|
return ec.fieldContext_Staff_is_active(ctx, field)
|
|
|
|
|
case "is_login":
|
|
|
|
|
@@ -1464,6 +1498,91 @@ func (ec *executionContext) fieldContext_Staff_phone_number(ctx context.Context,
|
|
|
|
|
return fc, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Staff_company_id(ctx context.Context, field graphql.CollectedField, obj *model.Staff) (ret graphql.Marshaler) {
|
|
|
|
|
fc, err := ec.fieldContext_Staff_company_id(ctx, field)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
|
return obj.CompanyID, nil
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
if resTmp == nil {
|
|
|
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
|
|
|
ec.Errorf(ctx, "must not be null")
|
|
|
|
|
}
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(string)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalNID2string(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) fieldContext_Staff_company_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
|
|
|
fc = &graphql.FieldContext{
|
|
|
|
|
Object: "Staff",
|
|
|
|
|
Field: field,
|
|
|
|
|
IsMethod: false,
|
|
|
|
|
IsResolver: false,
|
|
|
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
|
|
|
return nil, errors.New("field of type ID does not have child fields")
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
return fc, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Staff_company_name(ctx context.Context, field graphql.CollectedField, obj *model.Staff) (ret graphql.Marshaler) {
|
|
|
|
|
fc, err := ec.fieldContext_Staff_company_name(ctx, field)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
|
return obj.CompanyName, nil
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
if resTmp == nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(*string)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) fieldContext_Staff_company_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
|
|
|
fc = &graphql.FieldContext{
|
|
|
|
|
Object: "Staff",
|
|
|
|
|
Field: field,
|
|
|
|
|
IsMethod: false,
|
|
|
|
|
IsResolver: false,
|
|
|
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
|
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
return fc, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Staff_is_active(ctx context.Context, field graphql.CollectedField, obj *model.Staff) (ret graphql.Marshaler) {
|
|
|
|
|
fc, err := ec.fieldContext_Staff_is_active(ctx, field)
|
|
|
|
|
if err != nil {
|
|
|
|
|
@@ -4189,6 +4308,13 @@ func (ec *executionContext) _Staff(ctx context.Context, sel ast.SelectionSet, ob
|
|
|
|
|
}
|
|
|
|
|
case "phone_number":
|
|
|
|
|
out.Values[i] = ec._Staff_phone_number(ctx, field, obj)
|
|
|
|
|
case "company_id":
|
|
|
|
|
out.Values[i] = ec._Staff_company_id(ctx, field, obj)
|
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
|
out.Invalids++
|
|
|
|
|
}
|
|
|
|
|
case "company_name":
|
|
|
|
|
out.Values[i] = ec._Staff_company_name(ctx, field, obj)
|
|
|
|
|
case "is_active":
|
|
|
|
|
out.Values[i] = ec._Staff_is_active(ctx, field, obj)
|
|
|
|
|
case "is_login":
|
|
|
|
|
|