brandonmp / gatsby-source-google-sheets

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

"The gatsby-source-google-sheets plugin has generated no Gatsby nodes" when sheet has a single row #17

Closed j-nolan closed 6 years ago

j-nolan commented 6 years ago

Steps to reproduce:

  1. Query a spreadsheet that only has a single row
  2. gatsby develop
    success open and validate gatsby-config — 0.007 s
    ...
    ⠁ FETCHING SHEET function fetchData(_x2, _x3, _x4) {
    return _ref.apply(this, arguments);
    }
    warning The gatsby-source-google-sheets plugin has generated no Gatsby nodes. Do you need it?
    success source and transform nodes — 1.032 s
    ...

And indeed, graphiql shows me that no node are created. It works fine with sheets that contain at least two rows.

j-nolan commented 6 years ago

Update: this is because the first row is considered the header. I was mistaken about how the spreadsheet should be formatted.

Request is that documentation should be updated to make it clear that the first row is the header.

Happy to make a PR if maintainers agree.

drewatk commented 6 years ago

Closing in favor of #22