indexerPublicDataProvider
Midnight.js API Reference v2.0.2
Midnight.js API Reference / @midnight-ntwrk/midnight-js-indexer-public-data-provider / indexerPublicDataProvider
Function: indexerPublicDataProvider()
indexerPublicDataProvider(
queryURL,subscriptionURL,webSocketImpl):PublicDataProvider
Constructs a PublicDataProvider based on an ApolloClient.
Parameters
queryURL
string
The URL of a GraphQL server query endpoint.
subscriptionURL
string
The URL of a GraphQL server subscription (websocket) endpoint.
webSocketImpl
typeof WebSocket = ws.WebSocket
An optional websocket implementation for the Apollo client to use.
TODO: Re-examine caching when 'ContractCall' and 'ContractDeploy' have transaction identifiers included.