Created
March 17, 2019 01:32
-
-
Save bryanjswift/7dc21717c9df3cce56a54e69fae44b58 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Query { | |
article(id: ID!): Article | |
page(id: ID!): Page | |
product(id: ID!): Product | |
profile(id: ID!): Profile | |
} | |
type Article { | |
# Unique identifier for this piece of content */ | |
id: ID! | |
# Image used with headline/title */ | |
coverImage: Image! | |
# Text displayed with `coverImage` as part of headline */ | |
title: String! | |
# Text displayed after `coverImage` and `title` */ | |
subtitle: String | |
# Date of article publication */ | |
publishDate: String! | |
# Plain text estimated read length (e.g. "9 minute read") */ | |
duration: String | |
# Byline credit for the article */ | |
author: Contributor | |
# Photography credit for the images used with the article */ | |
photographer: Contributor | |
# List of categories and sub-categories in which this article could be found. | |
categories: [Category!]! | |
# Ordered sections of the article contents. */ | |
sections: [ArticleSection!]! | |
# The "tier" of article, used to differentiate how an `ArticleSection` is | |
# treated during render. | |
tier: ArticleTier! | |
# `Article` to be displayed next. | |
next: Article | |
} | |
type Page { | |
id: ID! | |
path: String! | |
title: String! | |
meta: Meta! | |
cards: [Card!]! | |
} | |
# Union of types having a `sectionType` attribue by which they can be | |
# disambiguated to their specific type. | |
union ArticleSection = MarkupSection | PhotoBillboardSection | PhotoSection | SlideshowSection | VideoSection; | |
# The "tier" of article, used to differentiate how `ArticleSection` is treated | |
# during render. | |
enum ArticleTier { | |
PRIMARY | |
SECONDARY | |
TERTIARY | |
} | |
# TODO | |
type Meta { | |
keywords: [String!]! | |
} | |
type Category { | |
id: ID! | |
name: String! | |
image: Image! | |
} | |
type Contributor { | |
id: ID! | |
name: String! | |
image: Image | |
bio: string | |
} | |
type Image { | |
src: String! | |
height: Int! | |
width: Int! | |
} | |
# Represents a video asset and meta data. | |
type Video { | |
# Video duration in seconds. | |
duration: Int! | |
# Specifies the location of the video assets. | |
file: VideoFile! | |
# The image to use as the video preview or poster. | |
preview: Image! | |
} | |
type VideoFile { | |
mp4: String! | |
webm: String | |
ogg: String | |
# Static image for display while video loads | |
poster: Image | |
} | |
enum Position { | |
BOTTOM_LEFT, | |
BOTTOM_RIGHT, | |
TOP_LEFT, | |
TOP_RIGHT, | |
} | |
type RelativeCoordinates { | |
from: Position! | |
x: Int! | |
y: Int! | |
} | |
type ProductCallout { | |
content: Product! | |
coordinates: RelativeCoordinates! | |
} | |
type Photo { | |
# `products` array can be empty but the array should be defined (not null) | |
products: [ProductCallout!]! | |
image: Image! | |
contributor: Contributor | |
caption: String | |
} | |
# A `Section` holding markup to use directly. | |
type MarkupSection implements Section { | |
# Markup to be used | |
markup: String! | |
# Used for disambiguation of `Section` children | |
sectionType: SectionType! | |
} | |
# A `Section` representing a `Photo` for display | |
type PhotoSection implements Section { | |
# The Image and associated caption and product meta data | |
photo: Photo! | |
# Used for disambiguation of `Section` children | |
sectionType: SectionType! | |
} | |
# A `PhotoSection` with a "billboard" color background. If no `billboardColor` | |
# is provided should select color from `Photo`. | |
type PhotoBillboardSection implements Section { | |
# Optional background color used in the billboard | |
billboardColor: String | |
# The Image and associated caption and product meta data | |
photo: Photo! | |
# Used for disambiguation of `Section` children | |
sectionType: SectionType! | |
} | |
# A `Section` representing a group of `Photo` instances which can be | |
# expanded in a "slideshow" or overlay for display. | |
type SlideshowSection implements Section { | |
# The images and associated meta data for products and caption. | |
photos: [Photo!]! | |
# Used for disambiguation of `Section` children | |
sectionType: SectionType! | |
} | |
# A `Section` representing a `Video` preloop and the assets for | |
# showing the player. | |
type VideoSection implements Section { | |
video: Video! | |
# Used for disambiguation of `Section` children | |
sectionType: SectionType! | |
} | |
# Marker for having a `sectionType` property | |
interface Section { | |
# Used for disambiguation of `Section` children | |
sectionType: SectionType! | |
} | |
# The possible types of Sections. | |
enum SectionType { | |
ACCORDION | |
FACT | |
INTRODUCTION | |
MARKUP | |
PHOTO | |
PHOTO_BILLBOARD | |
PRODUCT_COLLECTION | |
RELATED | |
SOCIAL_MEDIA | |
SHOP_LOOK | |
SLIDESHOW | |
VIDEO | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is really helpful, thank you.