From a1395234e6950347d8d0069b319b5c549b4c391f Mon Sep 17 00:00:00 2001 From: realaravinth Date: Sun, 31 Oct 2021 22:17:48 +0530 Subject: [PATCH] make certain fields non-nullable I think it is safe to assume that these files will never receive a null value. However, we should collect a bunch of data and verify this assumption. But for now, this means less boilerplate code --- schemas/schema.graphql | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/schemas/schema.graphql b/schemas/schema.graphql index 227f849..5a9b560 100644 --- a/schemas/schema.graphql +++ b/schemas/schema.graphql @@ -7,13 +7,13 @@ schema { } type Paragraphs { - text: String - type: String + text: String! + type: String! href: String layout: String iframe: IFrame metadata: MetaData - markups: [MarkUp ] + markups: [MarkUp! ]! } type MarkUp { @@ -39,24 +39,24 @@ type MediaResource{ } type MetaData { - id: String - originalWidth: Int - originalHeight: Int + id: String! + originalWidth: Int! + originalHeight: Int! } -type BodyModel { paragraphs: [Paragraphs ] } +type BodyModel { paragraphs: [Paragraphs! ]! } -type Content { bodyModel: BodyModel } +type Content { bodyModel: BodyModel! } -type User { id: String name: String } +type User { id: String! name: String! } type Post { id: ID! - title: String - createdAt: Int - content: Content - creator: User + title: String! + createdAt: Int! + content: Content! + creator: User! } type Data { post: Post }