From 9b7918ec23732bcbb8f4f2d82f67034d3d72be1e Mon Sep 17 00:00:00 2001 From: Kairo Araujo Date: Fri, 12 Apr 2024 09:53:28 +0200 Subject: [PATCH] fixup! feat: Implements the basic schema for Policy Signed-off-by: Kairo Araujo --- ent/schema/attestationpolicy.go | 2 +- ent/schema/statement.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ent/schema/attestationpolicy.go b/ent/schema/attestationpolicy.go index 6ed7453e..ba0eaa02 100644 --- a/ent/schema/attestationpolicy.go +++ b/ent/schema/attestationpolicy.go @@ -38,7 +38,7 @@ func (AttestationPolicy) Fields() []ent.Field { func (AttestationPolicy) Edges() []ent.Edge { return []ent.Edge{ edge.From("statement", Statement.Type). - Ref("policies").Unique(), + Ref("policy").Unique(), } } diff --git a/ent/schema/statement.go b/ent/schema/statement.go index 9e53210a..47cea537 100644 --- a/ent/schema/statement.go +++ b/ent/schema/statement.go @@ -38,7 +38,7 @@ func (Statement) Fields() []ent.Field { func (Statement) Edges() []ent.Edge { return []ent.Edge{ edge.To("subjects", Subject.Type).Annotations(entgql.RelayConnection()), - edge.To("policies", AttestationPolicy.Type).Annotations(entgql.RelayConnection()), + edge.To("policy", AttestationPolicy.Type).Unique(), edge.To("attestation_collections", AttestationCollection.Type).Unique(), edge.From("dsse", Dsse.Type).Ref("statement"),