brandonmp / gatsby-source-google-sheets

A GatsbyJS plugin that pulls nodes from rows in a Google Sheet.
90 stars 32 forks source link

How do I query from the plugin? #21

Closed Tresky closed 6 years ago

Tresky commented 6 years ago

I am fairly new to Gatsby and GraphQL as a whole. I got all of the setup work done for this plugin to get permissions working. I'm unsure how to actually write the GraphQL query though. Anyone have any insight?

drewatk commented 6 years ago

Until we can get some docs up the best way is to use GraphiQL to make test queries, which is built in to gatsby in development mode.

Here's a sample query of getting all rows in a spreadsheet. The title and description are column headers in my spreadsheet.

{
  allGoogleSheetSheet1Row {
    edges {
      node {
        title
        description
      }
    }
  }
}