From 380d85b6f9a067c7ee98bd9d097e7a90f015e160 Mon Sep 17 00:00:00 2001 From: axe312ger Date: Tue, 27 Jul 2021 17:06:14 +0100 Subject: [PATCH] refactor: update e2e test schema --- e2e-tests/contentful/schema.gql | 54 ++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/e2e-tests/contentful/schema.gql b/e2e-tests/contentful/schema.gql index bcb90a84d8168..b4cd0451ab64c 100644 --- a/e2e-tests/contentful/schema.gql +++ b/e2e-tests/contentful/schema.gql @@ -1,4 +1,4 @@ -### Type definitions saved at 2021-06-10T16:02:04.333Z ### +### Type definitions saved at 2021-07-27T16:05:23.858Z ### type File implements Node @dontInfer { sourceInstanceName: String! @@ -125,7 +125,7 @@ type MarkdownWordCount { words: Int } -type MarkdownRemark implements Node @childOf(mimeTypes: ["text/markdown", "text/x-markdown"], types: ["ContentfulText"]) @dontInfer { +type MarkdownRemark implements Node @childOf(mimeTypes: ["text/markdown", "text/x-markdown"], types: ["ContentfulText"]) @derivedTypes @dontInfer { frontmatter: MarkdownRemarkFrontmatter excerpt: String rawMarkdownBody: String @@ -137,7 +137,7 @@ type MarkdownRemarkFrontmatter { interface ContentfulReference implements Node { id: ID! - sys: ContentfulSys + sys: ContentfulSys! } type ContentfulSys { @@ -158,13 +158,23 @@ type ContentfulContentType implements Node @dontInfer { description: String! } -interface ContentfulEntry implements Node { +interface ContentfulEntry implements ContentfulReference & Node { id: ID! - sys: ContentfulSys + sys: ContentfulSys! + metadata: ContentfulMetadata! +} + +type ContentfulMetadata @dontInfer { + tags: [ContentfulTag]! @link(by: "id", from: "tags___NODE") +} + +type ContentfulTag implements Node @dontInfer { + name: String! + contentful_id: String! } type ContentfulAsset implements ContentfulReference & Node @dontInfer { - sys: ContentfulSys + sys: ContentfulSys! title: String description: String contentType: String @@ -206,7 +216,8 @@ type ContentfulText implements Node @dontInfer { } type ContentfulContentTypeNumber implements ContentfulReference & ContentfulEntry & Node @dontInfer { - sys: ContentfulSys + sys: ContentfulSys! + metadata: ContentfulMetadata! title: String integer: Int integerLocalized: Int @@ -215,7 +226,8 @@ type ContentfulContentTypeNumber implements ContentfulReference & ContentfulEntr } type ContentfulContentTypeText implements ContentfulReference & ContentfulEntry & Node @dontInfer { - sys: ContentfulSys + sys: ContentfulSys! + metadata: ContentfulMetadata! title: String short: String shortLocalized: String @@ -227,7 +239,8 @@ type ContentfulContentTypeText implements ContentfulReference & ContentfulEntry } type ContentfulContentTypeMediaReference implements ContentfulReference & ContentfulEntry & Node @dontInfer { - sys: ContentfulSys + sys: ContentfulSys! + metadata: ContentfulMetadata! title: String one: ContentfulAsset @link(by: "id", from: "one___NODE") oneLocalized: ContentfulAsset @link(by: "id", from: "oneLocalized___NODE") @@ -236,14 +249,16 @@ type ContentfulContentTypeMediaReference implements ContentfulReference & Conten } type ContentfulContentTypeBoolean implements ContentfulReference & ContentfulEntry & Node @dontInfer { - sys: ContentfulSys + sys: ContentfulSys! + metadata: ContentfulMetadata! title: String boolean: Boolean booleanLocalized: Boolean } type ContentfulContentTypeDate implements ContentfulReference & ContentfulEntry & Node @dontInfer { - sys: ContentfulSys + sys: ContentfulSys! + metadata: ContentfulMetadata! title: String date: Date @dateformat dateTime: Date @dateformat @@ -252,21 +267,24 @@ type ContentfulContentTypeDate implements ContentfulReference & ContentfulEntry } type ContentfulContentTypeLocation implements ContentfulReference & ContentfulEntry & Node @dontInfer { - sys: ContentfulSys + sys: ContentfulSys! + metadata: ContentfulMetadata! title: String location: ContentfulLocation locationLocalized: ContentfulLocation } type ContentfulContentTypeJson implements ContentfulReference & ContentfulEntry & Node @dontInfer { - sys: ContentfulSys + sys: ContentfulSys! + metadata: ContentfulMetadata! title: String json: JSON jsonLocalized: JSON } type ContentfulContentTypeRichText implements ContentfulReference & ContentfulEntry & Node @dontInfer { - sys: ContentfulSys + sys: ContentfulSys! + metadata: ContentfulMetadata! title: String richText: ContentfulRichText richTextLocalized: ContentfulRichText @@ -274,7 +292,8 @@ type ContentfulContentTypeRichText implements ContentfulReference & ContentfulEn } type ContentfulContentTypeContentReference implements ContentfulReference & ContentfulEntry & Node @dontInfer { - sys: ContentfulSys + sys: ContentfulSys! + metadata: ContentfulMetadata! title: String one: ContentfulEntry @link(by: "id", from: "one___NODE") oneLocalized: ContentfulEntry @link(by: "id", from: "oneLocalized___NODE") @@ -283,7 +302,8 @@ type ContentfulContentTypeContentReference implements ContentfulReference & Cont } type ContentfulContentTypeValidatedContentReference implements ContentfulReference & ContentfulEntry & Node @dontInfer { - sys: ContentfulSys + sys: ContentfulSys! + metadata: ContentfulMetadata! title: String oneItemSingleType: ContentfulEntry @link(by: "id", from: "oneItemSingleType___NODE") oneItemManyTypes: ContentfulEntry @link(by: "id", from: "oneItemManyTypes___NODE") @@ -293,7 +313,7 @@ type ContentfulContentTypeValidatedContentReference implements ContentfulReferen multipleItemsAllTypes: [ContentfulEntry] @link(by: "id", from: "multipleItemsAllTypes___NODE") } -type ContentfulContentTypeContentType implements Node @dontInfer { +type ContentfulContentTypeContentType implements Node @derivedTypes @dontInfer { name: String displayField: String description: String