npm install
npm run watch server
(ornpm run server
) in one terminalnpm start
in another
{
theme(name: "survivejs") {
primaryColor
secondaryColor
background
}
presentation(name: "intro-to-graphql") {
slides {
theme {
primaryColor
secondaryColor
background
}
layout
content {
... on TitleContent {
title
author
}
... on SectionContent {
title
}
... on EmbedContent {
title
link
}
... on MarkdownContent {
title
markup
}
}
}
}
}
mutation {
changePresentationTheme(
presentationName: "intro-to-graphql"
themeName: "survivejs"
) {
name
theme {
name
}
}
}
{
themes {
primaryColor
}
theme(name: "survivejs") {
primaryColor
secondaryColor
background
}
}
{
presentations {
name
}
presentation(name: "intro-to-graphql") {
slides {
theme {
primaryColor
secondaryColor
background
}
layout
content {
... on TitleContent {
title
author
}
... on SectionContent {
title
}
... on EmbedContent {
title
link
}
... on MarkdownContent {
title
markup
}
}
}
}
}
Query:
{
theme(name: @themeName) {
primaryColor
secondaryColor
background
}
}
Variables:
{
"themeName": "survivejs"
}