fetchHttpDriver()
Adapt a Fetch-like function into a graph-local HTTP driver.
Import
Section titled “Import”import { fetchHttpDriver } from "@graphrefly/ts/graph";Signature
Section titled “Signature”function fetchHttpDriver(fetchFn: FetchLike = requireGlobalFetch()): LocalHttpDriverParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
fetchFn | FetchLike | Fetch implementation that returns a response-like object. |
Returns
Section titled “Returns”A driver that performs one-shot HTTP requests and reports a single result.
Example
Section titled “Example”import { fetchHttpDriver } from "@graphrefly/ts/graph";
const http = fetchHttpDriver(fetch);Source
Section titled “Source”packages/ts/src/graph/environment.ts