From d2aeada1983a2a5040ea2db3d17ac60b5e5ebf7d Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Wed, 10 Apr 2024 16:48:15 +0200 Subject: [PATCH 1/2] add documentation --- .../kotlin/androidmakers/service/graphql/model.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/service/src/commonMain/kotlin/androidmakers/service/graphql/model.kt b/service/src/commonMain/kotlin/androidmakers/service/graphql/model.kt index a76de8c4..e896fd2d 100644 --- a/service/src/commonMain/kotlin/androidmakers/service/graphql/model.kt +++ b/service/src/commonMain/kotlin/androidmakers/service/graphql/model.kt @@ -291,6 +291,11 @@ sealed interface Node { data class Session( override val id: String, val title: String, + /** + * The description of the event. [description] may contain emojis and '\n' Chars but no markdown or HTML. + * + * May be null if no description is available. + */ val description: String?, /** * A shorter version of description for use when real estate is scarce like watches for an example. @@ -424,6 +429,11 @@ data class Venue( return descriptions.get("\"fr\"") ?: descriptions.get("en") ?: "" } + /** + * The description of the venue. [description] may contain emojis and '\n' Chars but no markdown or HTML. + * + * May be null if no description is available. + */ fun description(@GraphQLDefault("\"en\"") language: String?): String { return descriptions.get(language) ?: descriptions.get("en") ?: "" } From e705145f5c82d6b7dcdd173903007a653a558884 Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Wed, 10 Apr 2024 16:51:12 +0200 Subject: [PATCH 2/2] udpate schema --- service/graphql/schema.graphqls | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/service/graphql/schema.graphqls b/service/graphql/schema.graphqls index 24344fff..43801d4d 100644 --- a/service/graphql/schema.graphqls +++ b/service/graphql/schema.graphqls @@ -120,6 +120,11 @@ type Venue { descriptionFr: String! + """ + The description of the venue. [description] may contain emojis and '\n' Chars but no markdown or HTML. + + May be null if no description is available. + """ description(language: String = "en"): String! } @@ -134,6 +139,11 @@ type Session implements Node { title: String! + """ + The description of the event. [description] may contain emojis and '\n' Chars but no markdown or HTML. + + May be null if no description is available. + """ description: String """