Skip to content

Latest commit

 

History

History
136 lines (121 loc) · 1.76 KB

README.md

File metadata and controls

136 lines (121 loc) · 1.76 KB

SurviveJS Slides

  1. npm install
  2. npm run watch server (or npm run server) in one terminal
  3. npm start in another

Examples

Example Query

{
  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
        }
      }
    }
  }
}

Example Mutation

mutation {
  changePresentationTheme(
    presentationName: "intro-to-graphql"
    themeName: "survivejs"
  ) {
    name
    theme {
      name
    }
  }
}

Theme API

{
  themes {
    primaryColor
  }
  theme(name: "survivejs") {
    primaryColor
    secondaryColor
    background
  }
}

Presentation API

{
  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
        }
      }
    }
  }
}

Variables

Query:

{
  theme(name: @themeName) {
    primaryColor
    secondaryColor
    background
  }
}

Variables:

{
  "themeName": "survivejs"
}