@@ -285,13 +285,14 @@ type ComplexityRoot struct {
|
||||
}
|
||||
|
||||
Policy struct {
|
||||
Content func(childComplexity int) int
|
||||
CreatedAt func(childComplexity int) int
|
||||
ID func(childComplexity int) int
|
||||
Name func(childComplexity int) int
|
||||
Status func(childComplexity int) int
|
||||
UpdatedAt func(childComplexity int) int
|
||||
Version func(childComplexity int) int
|
||||
Content func(childComplexity int) int
|
||||
CreatedAt func(childComplexity int) int
|
||||
ID func(childComplexity int) int
|
||||
Name func(childComplexity int) int
|
||||
ReviewDate func(childComplexity int) int
|
||||
Status func(childComplexity int) int
|
||||
UpdatedAt func(childComplexity int) int
|
||||
Version func(childComplexity int) int
|
||||
}
|
||||
|
||||
PolicyConnection struct {
|
||||
@@ -1497,6 +1498,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.Policy.Name(childComplexity), true
|
||||
|
||||
case "Policy.reviewDate":
|
||||
if e.complexity.Policy.ReviewDate == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Policy.ReviewDate(childComplexity), true
|
||||
|
||||
case "Policy.status":
|
||||
if e.complexity.Policy.Status == nil {
|
||||
break
|
||||
@@ -2734,6 +2742,7 @@ input CreatePolicyInput {
|
||||
name: String!
|
||||
content: String!
|
||||
status: PolicyStatus!
|
||||
reviewDate: Datetime
|
||||
}
|
||||
|
||||
input UpdatePolicyInput {
|
||||
@@ -2742,6 +2751,7 @@ input UpdatePolicyInput {
|
||||
name: String
|
||||
content: String
|
||||
status: PolicyStatus
|
||||
reviewDate: Datetime
|
||||
}
|
||||
|
||||
input DeletePolicyInput {
|
||||
@@ -2766,6 +2776,7 @@ type Policy implements Node {
|
||||
name: String!
|
||||
status: PolicyStatus!
|
||||
content: String!
|
||||
reviewDate: Datetime
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
}
|
||||
@@ -9472,6 +9483,41 @@ func (ec *executionContext) fieldContext_Policy_content(_ context.Context, field
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Policy_reviewDate(ctx context.Context, field graphql.CollectedField, obj *types.Policy) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Policy_reviewDate(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.ReviewDate, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.(*time.Time)
|
||||
fc.Result = res
|
||||
return ec.marshalODatetime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Policy_reviewDate(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Policy",
|
||||
Field: field,
|
||||
IsMethod: false,
|
||||
IsResolver: false,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
return nil, errors.New("field of type Datetime does not have child fields")
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Policy_createdAt(ctx context.Context, field graphql.CollectedField, obj *types.Policy) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Policy_createdAt(ctx, field)
|
||||
if err != nil {
|
||||
@@ -9721,6 +9767,8 @@ func (ec *executionContext) fieldContext_PolicyEdge_node(_ context.Context, fiel
|
||||
return ec.fieldContext_Policy_status(ctx, field)
|
||||
case "content":
|
||||
return ec.fieldContext_Policy_content(ctx, field)
|
||||
case "reviewDate":
|
||||
return ec.fieldContext_Policy_reviewDate(ctx, field)
|
||||
case "createdAt":
|
||||
return ec.fieldContext_Policy_createdAt(ctx, field)
|
||||
case "updatedAt":
|
||||
@@ -11143,6 +11191,8 @@ func (ec *executionContext) fieldContext_UpdatePolicyPayload_policy(_ context.Co
|
||||
return ec.fieldContext_Policy_status(ctx, field)
|
||||
case "content":
|
||||
return ec.fieldContext_Policy_content(ctx, field)
|
||||
case "reviewDate":
|
||||
return ec.fieldContext_Policy_reviewDate(ctx, field)
|
||||
case "createdAt":
|
||||
return ec.fieldContext_Policy_createdAt(ctx, field)
|
||||
case "updatedAt":
|
||||
@@ -13966,7 +14016,7 @@ func (ec *executionContext) unmarshalInputCreatePolicyInput(ctx context.Context,
|
||||
asMap[k] = v
|
||||
}
|
||||
|
||||
fieldsInOrder := [...]string{"organizationId", "name", "content", "status"}
|
||||
fieldsInOrder := [...]string{"organizationId", "name", "content", "status", "reviewDate"}
|
||||
for _, k := range fieldsInOrder {
|
||||
v, ok := asMap[k]
|
||||
if !ok {
|
||||
@@ -14001,6 +14051,13 @@ func (ec *executionContext) unmarshalInputCreatePolicyInput(ctx context.Context,
|
||||
return it, err
|
||||
}
|
||||
it.Status = data
|
||||
case "reviewDate":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("reviewDate"))
|
||||
data, err := ec.unmarshalODatetime2ᚖtimeᚐTime(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.ReviewDate = data
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14479,7 +14536,7 @@ func (ec *executionContext) unmarshalInputUpdatePolicyInput(ctx context.Context,
|
||||
asMap[k] = v
|
||||
}
|
||||
|
||||
fieldsInOrder := [...]string{"id", "expectedVersion", "name", "content", "status"}
|
||||
fieldsInOrder := [...]string{"id", "expectedVersion", "name", "content", "status", "reviewDate"}
|
||||
for _, k := range fieldsInOrder {
|
||||
v, ok := asMap[k]
|
||||
if !ok {
|
||||
@@ -14521,6 +14578,13 @@ func (ec *executionContext) unmarshalInputUpdatePolicyInput(ctx context.Context,
|
||||
return it, err
|
||||
}
|
||||
it.Status = data
|
||||
case "reviewDate":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("reviewDate"))
|
||||
data, err := ec.unmarshalODatetime2ᚖtimeᚐTime(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.ReviewDate = data
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16903,6 +16967,8 @@ func (ec *executionContext) _Policy(ctx context.Context, sel ast.SelectionSet, o
|
||||
if out.Values[i] == graphql.Null {
|
||||
out.Invalids++
|
||||
}
|
||||
case "reviewDate":
|
||||
out.Values[i] = ec._Policy_reviewDate(ctx, field, obj)
|
||||
case "createdAt":
|
||||
out.Values[i] = ec._Policy_createdAt(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
|
||||
Reference in New Issue
Block a user