Remove unused gql field

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-03-03 19:41:05 +04:00
parent ebfec30a14
commit 5703bccc9a
6 changed files with 43 additions and 139 deletions

View File

@@ -6,7 +6,6 @@ export const currentTrustGraphQuery = graphql`
currentTrustCenter @required(action: THROW) {
id
slug
isViewerMember
logoFileUrl
darkLogoFileUrl
nonDisclosureAgreement {

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<69ddf57f16792925ca8a136115747014>>
* @generated SignedSource<<e0f568dfda1fadf66ee2ec5f79129196>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -24,7 +24,6 @@ export type TrustGraphCurrentQuery$data = {
};
readonly darkLogoFileUrl: string | null | undefined;
readonly id: string;
readonly isViewerMember: boolean;
readonly logoFileUrl: string | null | undefined;
readonly nonDisclosureAgreement: {
readonly fileName: string;
@@ -71,80 +70,73 @@ v2 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "isViewerMember",
"name": "logoFileUrl",
"storageKey": null
},
v3 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "logoFileUrl",
"name": "darkLogoFileUrl",
"storageKey": null
},
v4 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "darkLogoFileUrl",
"name": "fileName",
"storageKey": null
},
v5 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "fileName",
"name": "fileUrl",
"storageKey": null
},
v6 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "fileUrl",
"name": "status",
"storageKey": null
},
v7 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "status",
"name": "name",
"storageKey": null
},
v8 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "name",
"name": "description",
"storageKey": null
},
v9 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "description",
"name": "websiteUrl",
"storageKey": null
},
v10 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "websiteUrl",
"name": "email",
"storageKey": null
},
v11 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "email",
"storageKey": null
},
v12 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "headquarterAddress",
"storageKey": null
},
v13 = {
v12 = {
"alias": "vendorInfo",
"args": [
{
@@ -168,28 +160,28 @@ v13 = {
],
"storageKey": "vendors(first:0)"
},
v14 = [
v13 = [
{
"kind": "Literal",
"name": "first",
"value": 50
}
],
v15 = [
v14 = [
{
"kind": "Literal",
"name": "first",
"value": 5
}
],
v16 = {
v15 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "isUserAuthorized",
"storageKey": null
},
v17 = {
v16 = {
"alias": null,
"args": null,
"kind": "ScalarField",
@@ -217,7 +209,6 @@ return {
(v1/*: any*/),
(v2/*: any*/),
(v3/*: any*/),
(v4/*: any*/),
{
"alias": null,
"args": null,
@@ -226,8 +217,8 @@ return {
"name": "nonDisclosureAgreement",
"plural": false,
"selections": [
(v4/*: any*/),
(v5/*: any*/),
(v6/*: any*/),
{
"alias": null,
"args": null,
@@ -236,7 +227,7 @@ return {
"name": "viewerSignature",
"plural": false,
"selections": [
(v7/*: any*/)
(v6/*: any*/)
],
"storageKey": null
}
@@ -251,11 +242,11 @@ return {
"name": "organization",
"plural": false,
"selections": [
(v7/*: any*/),
(v8/*: any*/),
(v9/*: any*/),
(v10/*: any*/),
(v11/*: any*/),
(v12/*: any*/)
(v11/*: any*/)
],
"storageKey": null
},
@@ -264,10 +255,10 @@ return {
"kind": "FragmentSpread",
"name": "OverviewPageFragment"
},
(v13/*: any*/),
(v12/*: any*/),
{
"alias": null,
"args": (v14/*: any*/),
"args": (v13/*: any*/),
"concreteType": "AuditConnection",
"kind": "LinkedField",
"name": "audits",
@@ -331,7 +322,6 @@ return {
(v1/*: any*/),
(v2/*: any*/),
(v3/*: any*/),
(v4/*: any*/),
{
"alias": null,
"args": null,
@@ -340,8 +330,8 @@ return {
"name": "nonDisclosureAgreement",
"plural": false,
"selections": [
(v4/*: any*/),
(v5/*: any*/),
(v6/*: any*/),
{
"alias": null,
"args": null,
@@ -350,7 +340,7 @@ return {
"name": "viewerSignature",
"plural": false,
"selections": [
(v7/*: any*/),
(v6/*: any*/),
(v0/*: any*/)
],
"storageKey": null
@@ -366,11 +356,11 @@ return {
"name": "organization",
"plural": false,
"selections": [
(v7/*: any*/),
(v8/*: any*/),
(v9/*: any*/),
(v10/*: any*/),
(v11/*: any*/),
(v12/*: any*/),
(v0/*: any*/)
],
"storageKey": null
@@ -406,7 +396,7 @@ return {
"plural": false,
"selections": [
(v0/*: any*/),
(v8/*: any*/),
(v7/*: any*/),
{
"alias": null,
"args": null,
@@ -414,7 +404,7 @@ return {
"name": "logoUrl",
"storageKey": null
},
(v10/*: any*/)
(v9/*: any*/)
],
"storageKey": null
}
@@ -462,9 +452,9 @@ return {
"name": "countries",
"storageKey": null
},
(v7/*: any*/),
(v8/*: any*/),
(v9/*: any*/),
(v10/*: any*/)
(v9/*: any*/)
],
"storageKey": null
}
@@ -476,7 +466,7 @@ return {
},
{
"alias": null,
"args": (v15/*: any*/),
"args": (v14/*: any*/),
"concreteType": "DocumentConnection",
"kind": "LinkedField",
"name": "documents",
@@ -506,8 +496,8 @@ return {
"name": "title",
"storageKey": null
},
(v15/*: any*/),
(v16/*: any*/),
(v17/*: any*/),
{
"alias": null,
"args": null,
@@ -526,7 +516,7 @@ return {
},
{
"alias": null,
"args": (v15/*: any*/),
"args": (v14/*: any*/),
"concreteType": "TrustCenterFileConnection",
"kind": "LinkedField",
"name": "trustCenterFiles",
@@ -556,9 +546,9 @@ return {
"name": "category",
"storageKey": null
},
(v8/*: any*/),
(v16/*: any*/),
(v17/*: any*/)
(v7/*: any*/),
(v15/*: any*/),
(v16/*: any*/)
],
"storageKey": null
}
@@ -568,10 +558,10 @@ return {
],
"storageKey": "trustCenterFiles(first:5)"
},
(v13/*: any*/),
(v12/*: any*/),
{
"alias": null,
"args": (v14/*: any*/),
"args": (v13/*: any*/),
"concreteType": "AuditConnection",
"kind": "LinkedField",
"name": "audits",
@@ -594,7 +584,7 @@ return {
"plural": false,
"selections": [
(v0/*: any*/),
(v8/*: any*/),
(v7/*: any*/),
{
"alias": null,
"args": null,
@@ -611,8 +601,8 @@ return {
"name": "filename",
"storageKey": null
},
(v16/*: any*/),
(v17/*: any*/)
(v15/*: any*/),
(v16/*: any*/)
],
"storageKey": null
},
@@ -625,7 +615,7 @@ return {
"plural": false,
"selections": [
(v0/*: any*/),
(v8/*: any*/),
(v7/*: any*/),
{
"alias": null,
"args": null,
@@ -658,16 +648,16 @@ return {
]
},
"params": {
"cacheID": "fe1336b3897ba719a7e2210af673c378",
"cacheID": "442afcae5b414e0130cd702cf01f5c63",
"id": null,
"metadata": {},
"name": "TrustGraphCurrentQuery",
"operationKind": "query",
"text": "query TrustGraphCurrentQuery {\n currentTrustCenter {\n id\n slug\n isViewerMember\n logoFileUrl\n darkLogoFileUrl\n nonDisclosureAgreement {\n fileName\n fileUrl\n viewerSignature {\n status\n id\n }\n }\n organization {\n name\n description\n websiteUrl\n email\n headquarterAddress\n id\n }\n ...OverviewPageFragment\n vendorInfo: vendors(first: 0) {\n totalCount\n }\n audits(first: 50) {\n edges {\n node {\n id\n ...AuditRowFragment\n }\n }\n }\n }\n}\n\nfragment AuditRowFragment on Audit {\n name\n report {\n id\n filename\n isUserAuthorized\n hasUserRequestedAccess\n }\n framework {\n id\n name\n lightLogoURL\n darkLogoURL\n }\n}\n\nfragment DocumentRowFragment on Document {\n id\n title\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment OverviewPageFragment on TrustCenter {\n references(first: 14) {\n edges {\n node {\n id\n name\n logoUrl\n websiteUrl\n }\n }\n }\n vendors(first: 3) {\n edges {\n node {\n id\n countries\n ...VendorRowFragment\n }\n }\n }\n documents(first: 5) {\n edges {\n node {\n id\n ...DocumentRowFragment\n documentType\n }\n }\n }\n trustCenterFiles(first: 5) {\n edges {\n node {\n id\n category\n ...TrustCenterFileRowFragment\n }\n }\n }\n}\n\nfragment TrustCenterFileRowFragment on TrustCenterFile {\n id\n name\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment VendorRowFragment on Vendor {\n name\n description\n websiteUrl\n countries\n}\n"
"text": "query TrustGraphCurrentQuery {\n currentTrustCenter {\n id\n slug\n logoFileUrl\n darkLogoFileUrl\n nonDisclosureAgreement {\n fileName\n fileUrl\n viewerSignature {\n status\n id\n }\n }\n organization {\n name\n description\n websiteUrl\n email\n headquarterAddress\n id\n }\n ...OverviewPageFragment\n vendorInfo: vendors(first: 0) {\n totalCount\n }\n audits(first: 50) {\n edges {\n node {\n id\n ...AuditRowFragment\n }\n }\n }\n }\n}\n\nfragment AuditRowFragment on Audit {\n name\n report {\n id\n filename\n isUserAuthorized\n hasUserRequestedAccess\n }\n framework {\n id\n name\n lightLogoURL\n darkLogoURL\n }\n}\n\nfragment DocumentRowFragment on Document {\n id\n title\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment OverviewPageFragment on TrustCenter {\n references(first: 14) {\n edges {\n node {\n id\n name\n logoUrl\n websiteUrl\n }\n }\n }\n vendors(first: 3) {\n edges {\n node {\n id\n countries\n ...VendorRowFragment\n }\n }\n }\n documents(first: 5) {\n edges {\n node {\n id\n ...DocumentRowFragment\n documentType\n }\n }\n }\n trustCenterFiles(first: 5) {\n edges {\n node {\n id\n category\n ...TrustCenterFileRowFragment\n }\n }\n }\n}\n\nfragment TrustCenterFileRowFragment on TrustCenterFile {\n id\n name\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment VendorRowFragment on Vendor {\n name\n description\n websiteUrl\n countries\n}\n"
}
};
})();
(node as any).hash = "48f3ca2547e97d2378ccb0375ae9fae8";
(node as any).hash = "41cf8e5383cefdd5b3b7b85263eccb1f";
export default node;

View File

@@ -506,7 +506,6 @@ type TrustCenter implements Node {
nonDisclosureAgreement: NonDisclosureAgreement @goField(forceResolver: true)
isViewerMember: Boolean! @goField(forceResolver: true)
organization: Organization! @goField(forceResolver: true)
documents(

View File

@@ -202,7 +202,6 @@ type ComplexityRoot struct {
DarkLogoFileURL func(childComplexity int) int
Documents func(childComplexity int, first *int, after *page.CursorKey, last *int, before *page.CursorKey) int
ID func(childComplexity int) int
IsViewerMember func(childComplexity int) int
LogoFileURL func(childComplexity int) int
NonDisclosureAgreement func(childComplexity int) int
Organization func(childComplexity int) int
@@ -327,7 +326,6 @@ type TrustCenterResolver interface {
LogoFileURL(ctx context.Context, obj *types.TrustCenter) (*string, error)
DarkLogoFileURL(ctx context.Context, obj *types.TrustCenter) (*string, error)
NonDisclosureAgreement(ctx context.Context, obj *types.TrustCenter) (*types.NonDisclosureAgreement, error)
IsViewerMember(ctx context.Context, obj *types.TrustCenter) (bool, error)
Organization(ctx context.Context, obj *types.TrustCenter) (*types.Organization, error)
Documents(ctx context.Context, obj *types.TrustCenter, first *int, after *page.CursorKey, last *int, before *page.CursorKey) (*types.DocumentConnection, error)
Audits(ctx context.Context, obj *types.TrustCenter, first *int, after *page.CursorKey, last *int, before *page.CursorKey) (*types.AuditConnection, error)
@@ -922,12 +920,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin
}
return e.ComplexityRoot.TrustCenter.ID(childComplexity), true
case "TrustCenter.isViewerMember":
if e.ComplexityRoot.TrustCenter.IsViewerMember == nil {
break
}
return e.ComplexityRoot.TrustCenter.IsViewerMember(childComplexity), true
case "TrustCenter.logoFileUrl":
if e.ComplexityRoot.TrustCenter.LogoFileURL == nil {
break
@@ -1814,7 +1806,6 @@ type TrustCenter implements Node {
nonDisclosureAgreement: NonDisclosureAgreement @goField(forceResolver: true)
isViewerMember: Boolean! @goField(forceResolver: true)
organization: Organization! @goField(forceResolver: true)
documents(
@@ -5046,8 +5037,6 @@ func (ec *executionContext) fieldContext_Query_currentTrustCenter(_ context.Cont
return ec.fieldContext_TrustCenter_darkLogoFileUrl(ctx, field)
case "nonDisclosureAgreement":
return ec.fieldContext_TrustCenter_nonDisclosureAgreement(ctx, field)
case "isViewerMember":
return ec.fieldContext_TrustCenter_isViewerMember(ctx, field)
case "organization":
return ec.fieldContext_TrustCenter_organization(ctx, field)
case "documents":
@@ -5572,35 +5561,6 @@ func (ec *executionContext) fieldContext_TrustCenter_nonDisclosureAgreement(_ co
return fc, nil
}
func (ec *executionContext) _TrustCenter_isViewerMember(ctx context.Context, field graphql.CollectedField, obj *types.TrustCenter) (ret graphql.Marshaler) {
return graphql.ResolveField(
ctx,
ec.OperationContext,
field,
ec.fieldContext_TrustCenter_isViewerMember,
func(ctx context.Context) (any, error) {
return ec.Resolvers.TrustCenter().IsViewerMember(ctx, obj)
},
nil,
ec.marshalNBoolean2bool,
true,
true,
)
}
func (ec *executionContext) fieldContext_TrustCenter_isViewerMember(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TrustCenter",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Boolean does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _TrustCenter_organization(ctx context.Context, field graphql.CollectedField, obj *types.TrustCenter) (ret graphql.Marshaler) {
return graphql.ResolveField(
ctx,
@@ -10610,42 +10570,6 @@ func (ec *executionContext) _TrustCenter(ctx context.Context, sel ast.SelectionS
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "isViewerMember":
field := field
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._TrustCenter_isViewerMember(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "organization":
field := field

View File

@@ -209,7 +209,6 @@ type TrustCenter struct {
LogoFileURL *string `json:"logoFileUrl,omitempty"`
DarkLogoFileURL *string `json:"darkLogoFileUrl,omitempty"`
NonDisclosureAgreement *NonDisclosureAgreement `json:"nonDisclosureAgreement,omitempty"`
IsViewerMember bool `json:"isViewerMember"`
Organization *Organization `json:"organization"`
Documents *DocumentConnection `json:"documents"`
Audits *AuditConnection `json:"audits"`

View File

@@ -911,13 +911,6 @@ func (r *trustCenterResolver) NonDisclosureAgreement(ctx context.Context, obj *t
return types.NewNonDisclosureAgreement(file), nil
}
// IsViewerMember is the resolver for the isViewerMember field.
func (r *trustCenterResolver) IsViewerMember(ctx context.Context, obj *types.TrustCenter) (bool, error) {
membership := compliancepage.ComplianceMembershipFromContext(ctx)
return membership != nil, nil
}
// Organization is the resolver for the organization field.
func (r *trustCenterResolver) Organization(ctx context.Context, obj *types.TrustCenter) (*types.Organization, error) {
return obj.Organization, nil