andreamangano / gatsby-graphcms-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gatsby-graphcms-example

Example of @GraphCMS/gatsby-source-graphcms

Install

  1. git clone https://github.com/GraphCMS/gatsby-graphcms-example.git && cd gatsby-graphcms-example/
  2. yarn && yarn develop

GraphiQL

For an kitchen sink GraphiQL query you can run on Gatsby’s graphql debugger at http://localhost:8000/___graphql, try this link to preload with gatsby develop running:

Preload kitchen sink GraphiQL query

It puts this in the console:

{
  allArtist {
    edges {
      artist: node {
        id
        name
        slug
        picture {
          id
          handle
          width
          height
        }
        records {
          id
          slug
          title
        }
      }
    }
  }
  allRecord {
    edges {
      record: node {
        id
        slug
        title
        artist {
          id
          slug
          name
        }
        tracks {
          id
          title
          aliasedLength
        }
        cover {
          handle
        }
        reviews {
          id
          slug
          title
        }
      }
    }
  }
  allReview {
    edges {
      review: node {
        id
        slug
        createdAt
        record {
          slug
          title
          artist {
            slug
            name
          }
        }
        title
        review
        rating
        comments {
          body
        }
      }
    }
  }
}

Deploy

Deploy to Netlify

Contributors

and you?

See https://github.com/GraphCMS/gatsby-source-graphcms for more.

About

License:MIT License


Languages

Language:JavaScript 72.9%Language:CSS 27.1%