brandonmp / gatsby-source-google-sheets

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

There are conflicting field types in your data. GraphQL schema will omit those fields. #18

Closed MartinNuc closed 5 years ago

MartinNuc commented 6 years ago

I had a problem that column in my spreadsheet contained data:

1
2
3
5/6

First three rows were parsed as number but the last column was parsed as string. Which caused issue when loading data in GraphQL

warning There are conflicting field types in your data. GraphQL schema will omit those fields.
11:37:47 PM: spreadsheetRow.myColumn:
11:37:47 PM:  - type: number
11:37:47 PM:    value: 1
11:37:47 PM:  - type: string
11:37:47 PM:    value: '5/6'
error GraphQL Error Unknown field `myColumn` on type `spreadsheetRow`

Solution to this problem is to determine column type by content of all cells.

I was able to fix that. PR is coming ⏱