summaryrefslogtreecommitdiffstats
path: root/src/services/graphql/api.ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-15 16:36:58 +0200
committerArmand Philippot <git@armandphilippot.com>2022-05-15 16:36:58 +0200
commit235fe67d770f83131c9ec10b99012319440db690 (patch)
tree3b96e2c8a5877fe15a9cfa6bff46130fa7a04a65 /src/services/graphql/api.ts
parentfe2252ced2bb895e26179640553b5a6c02957d54 (diff)
chore: add Search page
Diffstat (limited to 'src/services/graphql/api.ts')
-rw-r--r--src/services/graphql/api.ts15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/services/graphql/api.ts b/src/services/graphql/api.ts
index 5bed9f9..171ab23 100644
--- a/src/services/graphql/api.ts
+++ b/src/services/graphql/api.ts
@@ -48,7 +48,7 @@ export type ArticlesResponse<T> = {
};
export type CommentsResponse<T> = {
- comments: T[];
+ comments: T;
};
export type SendMailResponse<T> = {
@@ -147,7 +147,14 @@ export type ByContentIdVar = {
contentId: number;
};
-export type sendMailVars = {
+export type SearchVar = {
+ /**
+ * A search term.
+ */
+ search?: string;
+};
+
+export type SendMailVars = {
body: string;
clientMutationId: string;
replyTo: string;
@@ -160,14 +167,14 @@ export type VariablesMap = {
[articlesQuery]: EdgesVars;
[articlesSlugQuery]: EdgesVars;
[commentsQuery]: ByContentIdVar;
- [sendMailMutation]: sendMailVars;
+ [sendMailMutation]: SendMailVars;
[thematicBySlugQuery]: BySlugVar;
[thematicsListQuery]: EdgesVars;
[thematicsSlugQuery]: EdgesVars;
[topicBySlugQuery]: BySlugVar;
[topicsListQuery]: EdgesVars;
[topicsSlugQuery]: EdgesVars;
- [totalArticlesQuery]: null;
+ [totalArticlesQuery]: SearchVar;
[totalThematicsQuery]: null;
[totalTopicsQuery]: null;
};