List queries with airtable backend and Rest API / How to do the load more query in the frontend?
See original GitHub issueHello,
If I start from the api documentation to make a list requests to a table. We figure out that the call is sequential, so there is no way to call page 4 before having fetched page 1, 2, 3… and the fetchNextPage(); function allow to call next page in the backend.
base('projects').select({
// Selecting the first 3 records in db:
maxRecords: 3,
view: "db"
}).eachPage(function page(records, fetchNextPage) {
// This function (`page`) will get called for each page of records.
records.forEach(function(record) {
console.log('Retrieved', record.get('title'));
});
// To fetch the next page of records, call `fetchNextPage`.
// If there are more records, `page` will get called again.
// If there are no more records, `done` will get called.
fetchNextPage();
}, function done(err) {
if (err) { console.error(err); return; }
});
But how can we use that in the front end (using the node.js airtable.js in the backend).
I make a first query from the front. The backend give me only the first 3 results. Then which query should I make from the front so that the backend do no need to make again the query for the first 3 results so that I can get next results ?
If I do all from the frontend, I can assign the fetchNextPage(); to the load more button.
But if I want to use a node.js api ?
Not possible @kasrak
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How to Query multiple records? - Airtable Community
I have a list >700 of customer IDs that I want to know more about. How can I query them in bulk rather...
Read more >Fetch data with the Airtable API and display it in a React app ...
Now we can use the Table component to display the data. To display it, I'm going to remove the id and createdOn properties...
Read more >Making REST and SOAP API Requests - Retool Docs
Querying a REST API. Whether you've connected a resource or added a URL directly into the query editor, you can send path and...
Read more >The Complete Developer's Guide to Airtable - Blog
In these use cases, you'll be using the Airtable REST API directly or ... As the prior query indicates, a base can contain...
Read more >Displaying Data from Related Tables Using Angular with the ...
The function makes a call to the API Server to retrieve the list of columns for the given table, which populates another drop-down...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please add a way to pass offset value to the
firstPage()
method to allow thisCan we reopen this issue? I would be very grateful for the addition of this feature!