Skip to content

Commit

Permalink
Merge pull request #1088 from paug/update-doc
Browse files Browse the repository at this point in the history
Add documentation for `Session.description` and `Venue.description`
  • Loading branch information
martinbonnin authored Apr 10, 2024
2 parents 1a8f4a8 + e705145 commit 216ce81
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions service/graphql/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -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!
}

Expand All @@ -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

"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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") ?: ""
}
Expand Down

0 comments on commit 216ce81

Please sign in to comment.