gatsby-source-strapi
gatsby-source-strapi copied to clipboard
suggest collectionTypes/singleTypes can set a async/await function
Because I have a lot of data, I want to classify and query the data, but there are also a lot of classifications. I need to take the classifications from the database and mark the ID of each classification respectively. Therefore, I think I need a async/await function here.
{
resolve: "gatsby-source-strapi",
options: {
apiURL: "http://localhost:1337",
collectionTypes: async () => {
reurn await myFetchFunc() // fetching data
},
queryLimit: 1000,
}
}