Comments (13)
PR #282 seems to solve that issue in a very simple way, by adding the rowIndex to the results. It enables us to sort manually at least. Merging that PR would at least make a workaround possible.
from gatsby-source-airtable.
Opening a new issue is perfect π . Thanks for digging into this. I am not necessarily intent on keeping Bluebird (as annoying as it is to remove it, add it, and then remove it again).
I have two thoughts on this which might be worth having a discussion with core maintainers. Can we expect that nodes created in a certain order will be returned in that same order when queried? I think this was the case before we added the async considerations. If that is something we should not depend on (now or in the future), we may need to add a way to sort the rows. Second is regarding the limits of downloading remote things in general. I wonder if it may be worth exploring (if it is even possible) adding this functionality to the core gatsby-source-filesystem
function createRemoteFileNode
to limit to number of concurrent downloads.
@pieh, I don't suppose I can bug you for your input on the above paragraph?
from gatsby-source-airtable.
I was able to resolve this myself with the following changes. Would you accept a PR of this?
Import both map
and mapSeries
from bluebird: const { map: mapParallel, mapSeries } = require('bluebird');
Use mapSeries
when concurrency is 1, maintaing the current functionality for other cases: const map = concurrency === 1 ? mapSeries : mapParallel;
from gatsby-source-airtable.
I like that. Would love a PR with that π . I think it's still worthwhile to add the row number on the node for sorting or special filtering, but that can be a separate PR.
from gatsby-source-airtable.
Is this still active?
from gatsby-source-airtable.
@zomars are you wondering if this is still an issue?
from gatsby-source-airtable.
Yes. I mean, the data is still fetched in the wrong order. I've tried to apply @christopherjbaker 's fix with no luck still.
from gatsby-source-airtable.
I suspect with all the async within this plugin and downstream in Gatsby core that it will be difficult to rely on any order. I do believe that we get a row id from our Airtable query though they could be used.
It seems it hasn't been enough of a pain point for someone to work on a PR though. Happy to accept PRs π
from gatsby-source-airtable.
This issue has been automatically marked as stale because it has not had any recent activity for 30 days. It will be closed if no further activity occurs within 7 days. Remove stale label, comment, and/or apply "ongoing issue" label to prevent this from being closed. Thank you for your contributions.
from gatsby-source-airtable.
Why is this closed?
from gatsby-source-airtable.
This issue has been automatically marked as stale because it has not had any recent activity for 30 days. It will be closed if no further activity occurs within 7 days. Remove stale label, comment, and/or apply "ongoing issue" label to prevent this from being closed. Thank you for your contributions.
from gatsby-source-airtable.
PR #282 seems to solve that issue in a very simple way, by adding the rowIndex to the results. It enables us to sort manually at least. Merging that PR would at least make a workaround possible.
To add to this, you can also add an automation that reindexes on change. I did this
// change these names to pick a view:
let table = base.getTable('Levels');
let view = table.getView('Grid view');
let result = await view.selectRecordsAsync({ fields: [table.getField("Index")] });
let i = 0, len = result.records.length;
while (i < len) {
const record = result.records[i]
const cellIndex = record.getCellValue("Index")
i += 1
const expectedIndex = i
if (record && cellIndex !== expectedIndex) {
// we dont want this to run when the indices are matched, save a few millisecs
await table.updateRecordAsync(record, {
'Index': expectedIndex,
});
}
}
from gatsby-source-airtable.
Closing as it seems to have been address in #282.
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.