forked from hypercerts-org/hypercerts-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcollectionArgs.ts
More file actions
28 lines (22 loc) · 946 Bytes
/
Copy pathcollectionArgs.ts
File metadata and controls
28 lines (22 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { ArgsType, Field, InputType } from "type-graphql";
import { BasicCollectionWhereInput } from "../inputs/collectionInput.js";
import type { OrderOptions } from "../inputs/orderOptions.js";
import { Collection } from "../typeDefs/collectionTypeDefs.js";
import { CollectionSortOptions } from "../inputs/sortOptions.js";
import { withPagination } from "./baseArgs.js";
@InputType()
export class CollectionWhereInput extends BasicCollectionWhereInput {}
@InputType()
export class CollectionFetchInput implements OrderOptions<Collection> {
@Field(() => CollectionSortOptions, { nullable: true })
by?: CollectionSortOptions;
}
@ArgsType()
export class CollectionArgs {
@Field(() => CollectionWhereInput, { nullable: true })
where?: CollectionWhereInput;
@Field(() => CollectionFetchInput, { nullable: true })
sort?: CollectionFetchInput;
}
@ArgsType()
export class GetCollectionsArgs extends withPagination(CollectionArgs) {}