Comments (9)
Ah, that makes sense! Thanks for your help!
from gatsby-source-airtable.
What we do here is create a new node that ties this field to that new file node that is created. You may just need to restart the gatsby develop
if you haven't. I don't think this will rebuild itself save (e.g. hot reloading).
You will likely go from a node that mirrors the JSON data Airtable would send like below:
The localFiles
will contain that file node that you are seeing in your query of allAirtableField
. My assumptions may very well be wrong, but please let me know if this helps.
from gatsby-source-airtable.
Hmm, I don’t seem to have a localFiles
field 🤔
I dug through the code and I can see that there is a conditional where you check if there are any local files before creating that field.
But I just traced it through and the localFiles___NODE
property is getting set to an array containing the node’s ID. So it seems like it should work… 🤔
from gatsby-source-airtable.
Hmm, part of me wonders if it is specifically an issue with a svg? I see your example using it.
from gatsby-source-airtable.
Or wait, I think I misunderstood. What I was looking at is the new node for the “AirtableField” being created? But when I look at processedData
in checkChildNode
, I can see that it has the link:
{
logo___NODE: '16f22541-3d66-5a9f-902d-7215f455e333'
}
It seems like it should work?
from gatsby-source-airtable.
Ach, I misunderstood on what node the localFiles
field was supposed to be. Sorry, I’m a bit new to Gatsby, let me start over.
The AirtableField is all good. I can see the localFiles
property. That node appears to be fine. The problem is what I originally thought. The logo
field that should be linked to the AirtableField node just isn’t there for some reason.
from gatsby-source-airtable.
Hmm, maybe I found the problem?
processedData
is passed into checkChildNode
here:
gatsby-source-airtable/gatsby-node.js
Line 221 in 6935e9a
processedData
is mutated to create the link here:
gatsby-source-airtable/gatsby-node.js
Lines 257 to 259 in 6935e9a
But if you step back out of that function, processedData
doesn’t seem to have been mutated. When I inspect it here:
gatsby-source-airtable/gatsby-node.js
Line 238 in 6935e9a
It doesn’t have the logo___NODE
property.
from gatsby-source-airtable.
FML. I updated some seemingly unrelated packages (gatsby-image, gatsby-plugin-sharp, and gatsby-transformer-sharp) and now it works 🙄
from gatsby-source-airtable.
There is some async/promise things going on which may explain why your log didn't see it mutated. We only mutate locally to "build" up the data on the node, and when that is complete we use it to create the node.
Well, I am glad that you figured it out at least. It seems that upstream has been having a few issues and eating the true error, then giving us unhelpful remains.
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.