-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
enhancementNew feature or requestNew feature or request
Description
We should allow the indexer definition function to be async to allow users to fetch any required data from an external service. For example, users may store configuration in an external vault and fetch the values at runtime.
export default async function (runtimeConfig: ApibaraRuntimeConfig) {
return defineIndexer(StarknetStream)({
// ...
});
}Required changes
- Make the
createIndexerhelper async. - Make sure we propagate that change across callers.
Testing
We should update the example to use the async definition. The example should call await (for example an http call to httpbin.org) somewhere before returning the indexer.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request