Rename owner by approver
Document owner does not make sense it's more an document approver. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
committed by
Sacha Al Himdani
parent
891d607602
commit
3d8c7c4dd6
@@ -702,6 +702,7 @@ type ComplexityRoot struct {
|
||||
}
|
||||
|
||||
Document struct {
|
||||
Approver func(childComplexity int) int
|
||||
Classification func(childComplexity int) int
|
||||
Controls func(childComplexity int, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ControlOrderBy, filter *types.ControlFilter) int
|
||||
CreatedAt func(childComplexity int) int
|
||||
@@ -710,7 +711,6 @@ type ComplexityRoot struct {
|
||||
DocumentType func(childComplexity int) int
|
||||
ID func(childComplexity int) int
|
||||
Organization func(childComplexity int) int
|
||||
Owner func(childComplexity int) int
|
||||
Permission func(childComplexity int, action string) int
|
||||
Title func(childComplexity int) int
|
||||
TrustCenterVisibility func(childComplexity int) int
|
||||
@@ -730,13 +730,13 @@ type ComplexityRoot struct {
|
||||
}
|
||||
|
||||
DocumentVersion struct {
|
||||
Approver func(childComplexity int) int
|
||||
Changelog func(childComplexity int) int
|
||||
Classification func(childComplexity int) int
|
||||
Content func(childComplexity int) int
|
||||
CreatedAt func(childComplexity int) int
|
||||
Document func(childComplexity int) int
|
||||
ID func(childComplexity int) int
|
||||
Owner func(childComplexity int) int
|
||||
Permission func(childComplexity int, action string) int
|
||||
PublishedAt func(childComplexity int) int
|
||||
Signatures func(childComplexity int, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.DocumentVersionSignatureOrder, filter *types.DocumentVersionSignatureFilter) int
|
||||
@@ -2058,7 +2058,7 @@ type DatumConnectionResolver interface {
|
||||
TotalCount(ctx context.Context, obj *types.DatumConnection) (int, error)
|
||||
}
|
||||
type DocumentResolver interface {
|
||||
Owner(ctx context.Context, obj *types.Document) (*types.Profile, error)
|
||||
Approver(ctx context.Context, obj *types.Document) (*types.Profile, error)
|
||||
Organization(ctx context.Context, obj *types.Document) (*types.Organization, error)
|
||||
Versions(ctx context.Context, obj *types.Document, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.DocumentVersionOrderBy, filter *types.DocumentVersionFilter) (*types.DocumentVersionConnection, error)
|
||||
Controls(ctx context.Context, obj *types.Document, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ControlOrderBy, filter *types.ControlFilter) (*types.ControlConnection, error)
|
||||
@@ -2071,7 +2071,7 @@ type DocumentConnectionResolver interface {
|
||||
type DocumentVersionResolver interface {
|
||||
Document(ctx context.Context, obj *types.DocumentVersion) (*types.Document, error)
|
||||
|
||||
Owner(ctx context.Context, obj *types.DocumentVersion) (*types.Profile, error)
|
||||
Approver(ctx context.Context, obj *types.DocumentVersion) (*types.Profile, error)
|
||||
Signatures(ctx context.Context, obj *types.DocumentVersion, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.DocumentVersionSignatureOrder, filter *types.DocumentVersionSignatureFilter) (*types.DocumentVersionSignatureConnection, error)
|
||||
Signed(ctx context.Context, obj *types.DocumentVersion) (bool, error)
|
||||
|
||||
@@ -4208,6 +4208,12 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin
|
||||
|
||||
return e.complexity.DeleteWebhookSubscriptionPayload.DeletedWebhookSubscriptionID(childComplexity), true
|
||||
|
||||
case "Document.approver":
|
||||
if e.complexity.Document.Approver == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Document.Approver(childComplexity), true
|
||||
case "Document.classification":
|
||||
if e.complexity.Document.Classification == nil {
|
||||
break
|
||||
@@ -4261,12 +4267,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin
|
||||
}
|
||||
|
||||
return e.complexity.Document.Organization(childComplexity), true
|
||||
case "Document.owner":
|
||||
if e.complexity.Document.Owner == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Document.Owner(childComplexity), true
|
||||
case "Document.permission":
|
||||
if e.complexity.Document.Permission == nil {
|
||||
break
|
||||
@@ -4340,6 +4340,12 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin
|
||||
|
||||
return e.complexity.DocumentEdge.Node(childComplexity), true
|
||||
|
||||
case "DocumentVersion.approver":
|
||||
if e.complexity.DocumentVersion.Approver == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.DocumentVersion.Approver(childComplexity), true
|
||||
case "DocumentVersion.changelog":
|
||||
if e.complexity.DocumentVersion.Changelog == nil {
|
||||
break
|
||||
@@ -4376,12 +4382,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin
|
||||
}
|
||||
|
||||
return e.complexity.DocumentVersion.ID(childComplexity), true
|
||||
case "DocumentVersion.owner":
|
||||
if e.complexity.DocumentVersion.Owner == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.DocumentVersion.Owner(childComplexity), true
|
||||
case "DocumentVersion.permission":
|
||||
if e.complexity.DocumentVersion.Permission == nil {
|
||||
break
|
||||
@@ -12795,7 +12795,7 @@ type Document implements Node {
|
||||
classification: DocumentClassification!
|
||||
currentPublishedVersion: Int
|
||||
trustCenterVisibility: TrustCenterVisibility!
|
||||
owner: Profile! @goField(forceResolver: true)
|
||||
approver: Profile! @goField(forceResolver: true)
|
||||
organization: Organization! @goField(forceResolver: true)
|
||||
|
||||
versions(
|
||||
@@ -14605,7 +14605,7 @@ input CreateDocumentInput {
|
||||
organizationId: ID!
|
||||
title: String!
|
||||
content: String!
|
||||
ownerId: ID!
|
||||
approverId: ID!
|
||||
documentType: DocumentType!
|
||||
classification: DocumentClassification!
|
||||
trustCenterVisibility: TrustCenterVisibility
|
||||
@@ -14615,7 +14615,7 @@ input UpdateDocumentInput {
|
||||
id: ID!
|
||||
title: String
|
||||
content: String
|
||||
ownerId: ID
|
||||
approverId: ID
|
||||
documentType: DocumentType
|
||||
classification: DocumentClassification
|
||||
trustCenterVisibility: TrustCenterVisibility
|
||||
@@ -15449,7 +15449,7 @@ type DocumentVersion implements Node {
|
||||
changelog: String!
|
||||
title: String!
|
||||
classification: DocumentClassification!
|
||||
owner: Profile! @goField(forceResolver: true)
|
||||
approver: Profile! @goField(forceResolver: true)
|
||||
|
||||
signatures(
|
||||
first: Int
|
||||
@@ -29115,14 +29115,14 @@ func (ec *executionContext) fieldContext_Document_trustCenterVisibility(_ contex
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Document_owner(ctx context.Context, field graphql.CollectedField, obj *types.Document) (ret graphql.Marshaler) {
|
||||
func (ec *executionContext) _Document_approver(ctx context.Context, field graphql.CollectedField, obj *types.Document) (ret graphql.Marshaler) {
|
||||
return graphql.ResolveField(
|
||||
ctx,
|
||||
ec.OperationContext,
|
||||
field,
|
||||
ec.fieldContext_Document_owner,
|
||||
ec.fieldContext_Document_approver,
|
||||
func(ctx context.Context) (any, error) {
|
||||
return ec.resolvers.Document().Owner(ctx, obj)
|
||||
return ec.resolvers.Document().Approver(ctx, obj)
|
||||
},
|
||||
nil,
|
||||
ec.marshalNProfile2ᚖgoᚗproboᚗincᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐProfile,
|
||||
@@ -29131,7 +29131,7 @@ func (ec *executionContext) _Document_owner(ctx context.Context, field graphql.C
|
||||
)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Document_owner(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
func (ec *executionContext) fieldContext_Document_approver(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Document",
|
||||
Field: field,
|
||||
@@ -29642,8 +29642,8 @@ func (ec *executionContext) fieldContext_DocumentEdge_node(_ context.Context, fi
|
||||
return ec.fieldContext_Document_currentPublishedVersion(ctx, field)
|
||||
case "trustCenterVisibility":
|
||||
return ec.fieldContext_Document_trustCenterVisibility(ctx, field)
|
||||
case "owner":
|
||||
return ec.fieldContext_Document_owner(ctx, field)
|
||||
case "approver":
|
||||
return ec.fieldContext_Document_approver(ctx, field)
|
||||
case "organization":
|
||||
return ec.fieldContext_Document_organization(ctx, field)
|
||||
case "versions":
|
||||
@@ -29730,8 +29730,8 @@ func (ec *executionContext) fieldContext_DocumentVersion_document(_ context.Cont
|
||||
return ec.fieldContext_Document_currentPublishedVersion(ctx, field)
|
||||
case "trustCenterVisibility":
|
||||
return ec.fieldContext_Document_trustCenterVisibility(ctx, field)
|
||||
case "owner":
|
||||
return ec.fieldContext_Document_owner(ctx, field)
|
||||
case "approver":
|
||||
return ec.fieldContext_Document_approver(ctx, field)
|
||||
case "organization":
|
||||
return ec.fieldContext_Document_organization(ctx, field)
|
||||
case "versions":
|
||||
@@ -29925,14 +29925,14 @@ func (ec *executionContext) fieldContext_DocumentVersion_classification(_ contex
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _DocumentVersion_owner(ctx context.Context, field graphql.CollectedField, obj *types.DocumentVersion) (ret graphql.Marshaler) {
|
||||
func (ec *executionContext) _DocumentVersion_approver(ctx context.Context, field graphql.CollectedField, obj *types.DocumentVersion) (ret graphql.Marshaler) {
|
||||
return graphql.ResolveField(
|
||||
ctx,
|
||||
ec.OperationContext,
|
||||
field,
|
||||
ec.fieldContext_DocumentVersion_owner,
|
||||
ec.fieldContext_DocumentVersion_approver,
|
||||
func(ctx context.Context) (any, error) {
|
||||
return ec.resolvers.DocumentVersion().Owner(ctx, obj)
|
||||
return ec.resolvers.DocumentVersion().Approver(ctx, obj)
|
||||
},
|
||||
nil,
|
||||
ec.marshalNProfile2ᚖgoᚗproboᚗincᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐProfile,
|
||||
@@ -29941,7 +29941,7 @@ func (ec *executionContext) _DocumentVersion_owner(ctx context.Context, field gr
|
||||
)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_DocumentVersion_owner(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
func (ec *executionContext) fieldContext_DocumentVersion_approver(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "DocumentVersion",
|
||||
Field: field,
|
||||
@@ -30356,8 +30356,8 @@ func (ec *executionContext) fieldContext_DocumentVersionEdge_node(_ context.Cont
|
||||
return ec.fieldContext_DocumentVersion_title(ctx, field)
|
||||
case "classification":
|
||||
return ec.fieldContext_DocumentVersion_classification(ctx, field)
|
||||
case "owner":
|
||||
return ec.fieldContext_DocumentVersion_owner(ctx, field)
|
||||
case "approver":
|
||||
return ec.fieldContext_DocumentVersion_approver(ctx, field)
|
||||
case "signatures":
|
||||
return ec.fieldContext_DocumentVersion_signatures(ctx, field)
|
||||
case "signed":
|
||||
@@ -30446,8 +30446,8 @@ func (ec *executionContext) fieldContext_DocumentVersionSignature_documentVersio
|
||||
return ec.fieldContext_DocumentVersion_title(ctx, field)
|
||||
case "classification":
|
||||
return ec.fieldContext_DocumentVersion_classification(ctx, field)
|
||||
case "owner":
|
||||
return ec.fieldContext_DocumentVersion_owner(ctx, field)
|
||||
case "approver":
|
||||
return ec.fieldContext_DocumentVersion_approver(ctx, field)
|
||||
case "signatures":
|
||||
return ec.fieldContext_DocumentVersion_signatures(ctx, field)
|
||||
case "signed":
|
||||
@@ -45461,8 +45461,8 @@ func (ec *executionContext) fieldContext_PublishDocumentVersionPayload_documentV
|
||||
return ec.fieldContext_DocumentVersion_title(ctx, field)
|
||||
case "classification":
|
||||
return ec.fieldContext_DocumentVersion_classification(ctx, field)
|
||||
case "owner":
|
||||
return ec.fieldContext_DocumentVersion_owner(ctx, field)
|
||||
case "approver":
|
||||
return ec.fieldContext_DocumentVersion_approver(ctx, field)
|
||||
case "signatures":
|
||||
return ec.fieldContext_DocumentVersion_signatures(ctx, field)
|
||||
case "signed":
|
||||
@@ -45520,8 +45520,8 @@ func (ec *executionContext) fieldContext_PublishDocumentVersionPayload_document(
|
||||
return ec.fieldContext_Document_currentPublishedVersion(ctx, field)
|
||||
case "trustCenterVisibility":
|
||||
return ec.fieldContext_Document_trustCenterVisibility(ctx, field)
|
||||
case "owner":
|
||||
return ec.fieldContext_Document_owner(ctx, field)
|
||||
case "approver":
|
||||
return ec.fieldContext_Document_approver(ctx, field)
|
||||
case "organization":
|
||||
return ec.fieldContext_Document_organization(ctx, field)
|
||||
case "versions":
|
||||
@@ -52250,8 +52250,8 @@ func (ec *executionContext) fieldContext_TrustCenterDocumentAccess_document(_ co
|
||||
return ec.fieldContext_Document_currentPublishedVersion(ctx, field)
|
||||
case "trustCenterVisibility":
|
||||
return ec.fieldContext_Document_trustCenterVisibility(ctx, field)
|
||||
case "owner":
|
||||
return ec.fieldContext_Document_owner(ctx, field)
|
||||
case "approver":
|
||||
return ec.fieldContext_Document_approver(ctx, field)
|
||||
case "organization":
|
||||
return ec.fieldContext_Document_organization(ctx, field)
|
||||
case "versions":
|
||||
@@ -54047,8 +54047,8 @@ func (ec *executionContext) fieldContext_UpdateDocumentPayload_document(_ contex
|
||||
return ec.fieldContext_Document_currentPublishedVersion(ctx, field)
|
||||
case "trustCenterVisibility":
|
||||
return ec.fieldContext_Document_trustCenterVisibility(ctx, field)
|
||||
case "owner":
|
||||
return ec.fieldContext_Document_owner(ctx, field)
|
||||
case "approver":
|
||||
return ec.fieldContext_Document_approver(ctx, field)
|
||||
case "organization":
|
||||
return ec.fieldContext_Document_organization(ctx, field)
|
||||
case "versions":
|
||||
@@ -54108,8 +54108,8 @@ func (ec *executionContext) fieldContext_UpdateDocumentVersionPayload_documentVe
|
||||
return ec.fieldContext_DocumentVersion_title(ctx, field)
|
||||
case "classification":
|
||||
return ec.fieldContext_DocumentVersion_classification(ctx, field)
|
||||
case "owner":
|
||||
return ec.fieldContext_DocumentVersion_owner(ctx, field)
|
||||
case "approver":
|
||||
return ec.fieldContext_DocumentVersion_approver(ctx, field)
|
||||
case "signatures":
|
||||
return ec.fieldContext_DocumentVersion_signatures(ctx, field)
|
||||
case "signed":
|
||||
@@ -63387,7 +63387,7 @@ func (ec *executionContext) unmarshalInputCreateDocumentInput(ctx context.Contex
|
||||
asMap[k] = v
|
||||
}
|
||||
|
||||
fieldsInOrder := [...]string{"organizationId", "title", "content", "ownerId", "documentType", "classification", "trustCenterVisibility"}
|
||||
fieldsInOrder := [...]string{"organizationId", "title", "content", "approverId", "documentType", "classification", "trustCenterVisibility"}
|
||||
for _, k := range fieldsInOrder {
|
||||
v, ok := asMap[k]
|
||||
if !ok {
|
||||
@@ -63415,13 +63415,13 @@ func (ec *executionContext) unmarshalInputCreateDocumentInput(ctx context.Contex
|
||||
return it, err
|
||||
}
|
||||
it.Content = data
|
||||
case "ownerId":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ownerId"))
|
||||
case "approverId":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("approverId"))
|
||||
data, err := ec.unmarshalNID2goᚗproboᚗincᚋproboᚋpkgᚋgidᚐGID(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.OwnerID = data
|
||||
it.ApproverID = data
|
||||
case "documentType":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("documentType"))
|
||||
data, err := ec.unmarshalNDocumentType2goᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐDocumentType(ctx, v)
|
||||
@@ -68341,7 +68341,7 @@ func (ec *executionContext) unmarshalInputUpdateDocumentInput(ctx context.Contex
|
||||
asMap[k] = v
|
||||
}
|
||||
|
||||
fieldsInOrder := [...]string{"id", "title", "content", "ownerId", "documentType", "classification", "trustCenterVisibility"}
|
||||
fieldsInOrder := [...]string{"id", "title", "content", "approverId", "documentType", "classification", "trustCenterVisibility"}
|
||||
for _, k := range fieldsInOrder {
|
||||
v, ok := asMap[k]
|
||||
if !ok {
|
||||
@@ -68369,13 +68369,13 @@ func (ec *executionContext) unmarshalInputUpdateDocumentInput(ctx context.Contex
|
||||
return it, err
|
||||
}
|
||||
it.Content = data
|
||||
case "ownerId":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ownerId"))
|
||||
case "approverId":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("approverId"))
|
||||
data, err := ec.unmarshalOID2ᚖgoᚗproboᚗincᚋproboᚋpkgᚋgidᚐGID(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.OwnerID = data
|
||||
it.ApproverID = data
|
||||
case "documentType":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("documentType"))
|
||||
data, err := ec.unmarshalODocumentType2ᚖgoᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐDocumentType(ctx, v)
|
||||
@@ -77056,7 +77056,7 @@ func (ec *executionContext) _Document(ctx context.Context, sel ast.SelectionSet,
|
||||
if out.Values[i] == graphql.Null {
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
case "owner":
|
||||
case "approver":
|
||||
field := field
|
||||
|
||||
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
|
||||
@@ -77065,7 +77065,7 @@ func (ec *executionContext) _Document(ctx context.Context, sel ast.SelectionSet,
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
}
|
||||
}()
|
||||
res = ec._Document_owner(ctx, field, obj)
|
||||
res = ec._Document_approver(ctx, field, obj)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&fs.Invalids, 1)
|
||||
}
|
||||
@@ -77475,7 +77475,7 @@ func (ec *executionContext) _DocumentVersion(ctx context.Context, sel ast.Select
|
||||
if out.Values[i] == graphql.Null {
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
case "owner":
|
||||
case "approver":
|
||||
field := field
|
||||
|
||||
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
|
||||
@@ -77484,7 +77484,7 @@ func (ec *executionContext) _DocumentVersion(ctx context.Context, sel ast.Select
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
}
|
||||
}()
|
||||
res = ec._DocumentVersion_owner(ctx, field, obj)
|
||||
res = ec._DocumentVersion_approver(ctx, field, obj)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&fs.Invalids, 1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user