Using Gatsby, I try syncing Airtable data with Algolia via GraphQL but the plugin does not update the index during build. Revised config below:
const sampleQuery = `{
allContent {
nodes { uniqueID: id, fileName, url }
}
}`;
const querySet = [{
query: sampleQuery,
transformer: ({ data }) => data.allContent.nodes,
indexName: 'demoIndex'
}];
module.exports = {
plugins: [
{
resolve: 'gatsby-source-airtable-custom',
options: {
apiKey: process.env.AIRTABLE_API_KEY,
baseId: process.env.AIRTABLE_BASE_ID,
table: 'Records'
}
},
{
resolve: 'gatsby-algolia-sync-plugin',
options: {
appId: process.env.ALGOLIA_APP_ID,
apiKey: process.env.ALGOLIA_API_KEY,
indexName: 'demoIndex',
queries: querySet,
chunkSize: 500000
}
}
]
};