| 1 |
package archivista |
| 2 |
|
| 3 |
// This file will be automatically regenerated based on the schema, any resolver implementations |
| 4 |
// will be copied through when generating and any unknown code will be moved to the end. |
| 5 |
// Code generated by github.com/99designs/gqlgen version v0.17.78 |
| 6 |
|
| 7 |
import ( |
| 8 |
"context" |
| 9 |
"fmt" |
| 10 |
|
| 11 |
"entgo.io/contrib/entgql" |
| 12 |
"github.com/google/uuid" |
| 13 |
"github.com/in-toto/archivista/ent" |
| 14 |
) |
| 15 |
|
| 16 |
// Node is the resolver for the node field. |
| 17 |
func (r *queryResolver) Node(ctx context.Context, id uuid.UUID) (ent.Noder, error) { |
| 18 |
return r.client.Noder(ctx, id) |
| 19 |
} |
| 20 |
|
| 21 |
// Nodes is the resolver for the nodes field. |
| 22 |
func (r *queryResolver) Nodes(ctx context.Context, ids []uuid.UUID) ([]ent.Noder, error) { |
| 23 |
return r.client.Noders(ctx, ids) |
| 24 |
} |
| 25 |
|
| 26 |
// AttestationPolicies is the resolver for the attestationPolicies field. |
| 27 |
func (r *queryResolver) AttestationPolicies(ctx context.Context, after *entgql.Cursor[uuid.UUID], first *int, before *entgql.Cursor[uuid.UUID], last *int, where *ent.AttestationPolicyWhereInput) (*ent.AttestationPolicyConnection, error) { |
| 28 |
panic(fmt.Errorf("not implemented: AttestationPolicies - attestationPolicies")) |
| 29 |
} |
| 30 |
|
| 31 |
// Dsses is the resolver for the dsses field. |
| 32 |
func (r *queryResolver) Dsses(ctx context.Context, after *entgql.Cursor[uuid.UUID], first *int, before *entgql.Cursor[uuid.UUID], last *int, orderBy *ent.DsseOrder, where *ent.DsseWhereInput) (*ent.DsseConnection, error) { |
| 33 |
return r.client.Dsse.Query().Paginate(ctx, after, first, before, last, ent.WithDsseFilter(where.Filter)) |
| 34 |
} |
| 35 |
|
| 36 |
// Subjects is the resolver for the subjects field. |
| 37 |
func (r *queryResolver) Subjects(ctx context.Context, after *entgql.Cursor[uuid.UUID], first *int, before *entgql.Cursor[uuid.UUID], last *int, orderBy *ent.SubjectOrder, where *ent.SubjectWhereInput) (*ent.SubjectConnection, error) { |
| 38 |
return r.client.Subject.Query().Paginate(ctx, after, first, before, last, ent.WithSubjectFilter(where.Filter)) |
| 39 |
} |
| 40 |
|
| 41 |
// Query returns QueryResolver implementation. |
| 42 |
func (r *Resolver) Query() QueryResolver { return &queryResolver{r} } |
| 43 |
|
| 44 |
type queryResolver struct{ *Resolver } |