-
-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Description
When some fields are empty on a certain row, the api result from airtable doesn't include the field in that row.
{
"records": [
{
"id": "recR4fJQsMlpWyy5A",
"fields": {
"Name": "John"
},
"createdTime": "2018-12-30T07:10:11.000Z"
},
{
"id": "recoqit7jOBr8m6JK",
"fields": {
"Name": "Michael",
"Notes": "Note1"
},
"createdTime": "2018-12-30T07:10:11.000Z"
}
]
}
You can see "Notes" field is missing at the first row. Could we have a fields option?
{
resolve: 'gatsby-source-airtable',
options: {
apiKey: 'xxx',
tables: [
{
baseId: 'xxx',
tableName: 'xxx',
tableView: 'xxx',
fields: ['Name', 'Notes']
},
],
},
}
When fields is specified, the result will always include all the fields with null as default value if none.
This is to prevent graphql query from failing. Refer to gatsbyjs/gatsby#2392
What do you think?
Metadata
Metadata
Assignees
Labels
No labels
