aboutsummaryrefslogtreecommitdiffstats
path: root/src/types/graphql/generics.ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-09-19 18:13:57 +0200
committerArmand Philippot <git@armandphilippot.com>2023-09-19 19:12:31 +0200
commit2faf2e34331703b3bdea3eb487cb8799c8d65377 (patch)
treededc6557ddaa8fedd42d9bdf77950f8f9168ebcb /src/types/graphql/generics.ts
parentd1fe9e2164fc5c8fd767b456eecc2a4eb929a33f (diff)
refactor(build): replace paths aliases with relative paths
Using paths aliases starting with "@" can be confusing and can lead to conflict with existings modules. I prefer to use relative paths to avoid extra configuration in tools because of these aliases.
Diffstat (limited to 'src/types/graphql/generics.ts')
-rw-r--r--src/types/graphql/generics.ts25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/types/graphql/generics.ts b/src/types/graphql/generics.ts
new file mode 100644
index 0000000..dec5f10
--- /dev/null
+++ b/src/types/graphql/generics.ts
@@ -0,0 +1,25 @@
+export type GraphQLPageInfo = {
+ endCursor: string;
+ hasNextPage: boolean;
+ total: number;
+};
+
+export type GraphQLEdges<T> = {
+ cursor: string;
+ node: T;
+};
+
+export type GraphQLEdgesInput = {
+ after?: string;
+ before?: string;
+ first?: number;
+ last?: number;
+};
+
+export type GraphQLNode<T> = {
+ node: T;
+};
+
+export type GraphQLNodes<T> = {
+ nodes: T[];
+};