aboutsummaryrefslogtreecommitdiffstats
path: root/tests/msw/schema
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-11-27 19:40:40 +0100
committerArmand Philippot <git@armandphilippot.com>2023-11-28 18:04:24 +0100
commitfb749e8befb2dcdc266c2e8b7ef7c9001947143a (patch)
tree80ae62cd0a699d4feb14fe2a239b4fe317a400a0 /tests/msw/schema
parentab81df7f3d317281a05caec18e2cfd89dc26bc7a (diff)
test(services): add tests for posts fetchers
Diffstat (limited to 'tests/msw/schema')
-rw-r--r--tests/msw/schema/types/index.ts5
-rw-r--r--tests/msw/schema/types/post.types.ts8
2 files changed, 13 insertions, 0 deletions
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!
}`;