aboutsummaryrefslogtreecommitdiffstats
path: root/src/types/data.ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-11-28 16:18:03 +0100
committerArmand Philippot <git@armandphilippot.com>2023-11-28 18:04:24 +0100
commitf564d181bc428e25a02bf1d98c4449a6b3eb8e9e (patch)
tree6057a1e3a419957fb32d1a08160d5d746e54bc04 /src/types/data.ts
parent180134883b281883246fc9909b1d494363861144 (diff)
fix(services,types): make coherent Thematic type and query
* some nodes was queried but missing in the Thematic type and vice versa, it is now fixed * add tests for all thematics fetchers
Diffstat (limited to 'src/types/data.ts')
-rw-r--r--src/types/data.ts18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/types/data.ts b/src/types/data.ts
index 9a6d674..c582709 100644
--- a/src/types/data.ts
+++ b/src/types/data.ts
@@ -57,6 +57,8 @@ export type WPImage = {
type WPInfo = { wordsCount: number };
type WPContent = {
+ contentParts: WPContentParts;
+ databaseId: number;
date: string;
featuredImage: Nullable<GraphQLNode<WPImage>>;
modified: string;
@@ -66,7 +68,6 @@ type WPContent = {
};
export type WPPage = WPContent & {
- contentParts: WPContentParts;
info: WPInfo;
};
@@ -81,8 +82,6 @@ export type WPPost = WPContent & {
acfPosts: Nullable<Partial<WPAcfPosts>>;
author: GraphQLNode<WPPostAuthor>;
commentCount: Nullable<number>;
- contentParts: WPContentParts;
- databaseId: number;
info: WPInfo;
};
@@ -118,9 +117,10 @@ export type WPThematic = WPContent & {
acfThematics: Nullable<WPAcfThematics>;
};
-export type WPThematicPreview = Pick<WPThematic, 'slug' | 'title'> & {
- databaseId: number;
-};
+export type WPThematicPreview = Pick<
+ WPThematic,
+ 'databaseId' | 'slug' | 'title'
+>;
type WPAcfTopics = {
officialWebsite: string;
@@ -133,10 +133,8 @@ export type WPTopic = WPContent & {
export type WPTopicPreview = Pick<
WPTopic,
- 'featuredImage' | 'slug' | 'title'
-> & {
- databaseId: number;
-};
+ 'databaseId' | 'featuredImage' | 'slug' | 'title'
+>;
//===========================================================================
// Data from MDX files