Strange bug - Gatsby returns ALL NULL's for an Airtable field with data
rmcsharry opened this issue · comments
FIrst off, thanks for this great plugin.
I had a field in my AirTable that was called
Phone no. (Cell)
Gatsby renamde it to:
Phone_no___Cell_
that is 3 underscores before "Cell" and 1 after
Although every record has phone numbers, they are all NULL in Gatsby.
I tried quite a few things to fix this (eg. changing the Airtable field type to text instead of Phone Number, creating a schema customisation in Gatsby to force an error on non null - didn't work!)
So finally I renamed the field to Cell Number
and now the data appears.
I am not sure if this is an issue with this plugin or Gatsby itself.
👋
I wonder if there is significance with the 3 underscores not working. I don't suppose you tried it without the period?
Hmmm you might be correct re. the 3 underscores. I will try without the period and see what happens and post back.
Good call! If I remove the '.' then Phone no (Cell)
becomes Phone_no__Cell_
and it works.
So the 3 underscores appears to be the issue.
I think gatsby core depends on three underscores for some transformations. I wonder if this is strictly only worthwhile to put in documention?
I thought someone had asked in the past about passing a custom function that "cleans" the keys, but I am not finding it right now. With the next major version it may make sense to remove leading, trailing and multiple adjacent underscores.
Yes I think it's probably a useful addition to the docs.
Would you be willing to submit a pull request?
Done:
#202
Closed via #202.