This example is outdated. It uses an old way to connect GraphCMS to Gatsby via the gatsby-source-graphcms
plugin. The up to date example can be found here
Example of @GraphCMS/gatsby-source-graphcms
git clone https://github.com/GraphCMS/gatsby-graphcms-example.git && cd gatsby-graphcms-example/
yarn && yarn develop
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
}
}
}
}
}
- @redmega Angel Piscola
- @rafacm Rafael Cordones
- @hmeissner Hugo Meissner
- @rdela Ricky de Laveaga
…and you?
See https://github.com/GraphCMS/gatsby-source-graphcms for more.