Comments (4)
Hmm, so just that I am clear...
You have a column name in Airtable that needs cleaning. It comes in, gets "cleaned" and changes. In the mapping, you provided a name to match it. To match, you used the cleaned name, not the original name. Just high-level thinking here, we don't want to force changes on your Airtable so once we hit gatsby, we should only consider and use one name everywhere for simplicity, which would mean we should use the cleaned name, both in config and in queries.
Assuming I understand correctly, I think I would consider it a bug. A side consideration though is the discovery of the cleaned key could be a problem. How did you know it got cleaned? Throwing a warning in the code that this happened might be useful, but is that overly verbose to warn every time?
from gatsby-source-airtable.
Hello,
You understood me perfectly. I tried to use the cleaned key and it just failed silently, I guess I just assumed it would use the cleaned key and then it took a bit of debugging before I realised that it was mapping on the original name.
I found that it was using the cleaned name after changing the column name in Airtable to remove the space from the name and it started working. Then I started reading the code.
I agree that it would be good to align the API around a single key but yes discovery is likely to become an issue. Console warnings might be a little too much if they're displayed every time. Do you think just stating we always use the cleaned keys in both config and queries in the documentation is enough?
from gatsby-source-airtable.
The only other option I can think of would be to warn on key change, and also allow an option to turn it off in the table config. So while your website is in development you would see it, and when you are confident with the schema you can turn it off.
from gatsby-source-airtable.
Do you think the previous be the best path forward, @shaunbent? Would you be available for a PR?
from gatsby-source-airtable.
Related Issues (20)
- Gatsby v3 DeprecationWarning HOT 4
- Combining fileNode and text/markdown mappings HOT 3
- faster build when sourcing a lot of data HOT 2
- getting base name in graphql
- Field type mismatch in Airtable means field doesn't show up at all in Gatsby HOT 1
- Query on Collaborator type does not recognise the profilePicUrl
- is it possible to filter by a field in a Linked Table? HOT 1
- Dependency Dashboard
- Slow build times HOT 1
- Mp3 files get converted to Mpga HOT 3
- Unused variable `nodeType`
- Can this plugin be used to link lookup fields instead of linked records?
- How do add default tableLinks?
- update for Gatsby V4
- base name issue in Airtable?
- Upcoming updates to Airtable Attachment URLs that are fetched via API HOT 8
- error Cannot read properties of undefined (reading 'id')
- Early heads up: switching away from user API keys HOT 1
- Accelerated need to limit large url requests to “list records”, with alternative POST version HOT 5
- Build take alot of time.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby-source-airtable.