From fb749e8befb2dcdc266c2e8b7ef7c9001947143a Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 27 Nov 2023 19:40:40 +0100 Subject: test(services): add tests for posts fetchers --- tests/msw/schema/types/index.ts | 5 +++++ tests/msw/schema/types/post.types.ts | 8 ++++++++ 2 files changed, 13 insertions(+) (limited to 'tests/msw/schema/types') diff --git a/tests/msw/schema/types/index.ts b/tests/msw/schema/types/index.ts index ea749be..163955b 100644 --- a/tests/msw/schema/types/index.ts +++ b/tests/msw/schema/types/index.ts @@ -6,6 +6,11 @@ import { thematicTypes } from './thematic.types'; import { topicTypes } from './topic.types'; const rootQueryType = `type Query { + post( + asPreview: Boolean + id: ID! + idType: PostIdType + ): Post posts( after: String before: String diff --git a/tests/msw/schema/types/post.types.ts b/tests/msw/schema/types/post.types.ts index 04c4f37..11c514c 100644 --- a/tests/msw/schema/types/post.types.ts +++ b/tests/msw/schema/types/post.types.ts @@ -22,6 +22,13 @@ type Post { title(format: PostObjectFieldFormatEnum): String } +enum PostIdType { + DATABASE_ID + ID + SLUG + URI +} + enum PostStatusEnum { ACF_DISABLED AUTO_DRAFT @@ -66,6 +73,7 @@ type RootQueryToPostConnectionPageInfo { type RootQueryToPostConnection { edges: [RootQueryToPostConnectionEdge!]! + nodes: [Post!]! pageInfo: RootQueryToPostConnectionPageInfo! }`; -- cgit v1.2.3