Skip to content
PACKAGES

fetchHttpDriver()

Adapt a Fetch-like function into a graph-local HTTP driver.

import { fetchHttpDriver } from "@graphrefly/ts/graph";
function fetchHttpDriver(fetchFn: FetchLike = requireGlobalFetch()): LocalHttpDriver
ParameterTypeDescription
fetchFnFetchLikeFetch implementation that returns a response-like object.

A driver that performs one-shot HTTP requests and reports a single result.

import { fetchHttpDriver } from "@graphrefly/ts/graph";
const http = fetchHttpDriver(fetch);

packages/ts/src/graph/environment.ts