Skip to content

Instantly share code, notes, and snippets.

@rbro112
Last active December 5, 2021 03:49
Show Gist options
  • Save rbro112/3d92ddf473de1950b5cbdc03d442cbe7 to your computer and use it in GitHub Desktop.
Save rbro112/3d92ddf473de1950b5cbdc03d442cbe7 to your computer and use it in GitHub Desktop.
A sample of the GP section schema.
# Example sections
type HeroSection {
# Image urls
images: [String]!
}
type TitleSection {
title: String!,
titleStyle: TextStyle!
# Optional subtitle
subtitle: String
subtitleStyle: TextStyle
# Action to be taken when tapping the optional subtitle
onSubtitleClickAction: IAction
}
enum SectionComponentType {
HERO,
TITLE,
PLUS_TITLE,
# ... There's alot of these :)
}
union Section = HeroSection
| TitleSection
| # ... More section data models
# The wrapper that wraps each section. Responsible for metadata, logging data and SectionComponentType
type SectionContainer {
id: String!
# The key that determines how to render the section data model
sectionComponentType: SectionComponentType
# The data for this specific section
section: Section
# ... Metadata, logging data & more
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment