GraphReFlyTS

API Reference

fetchHttpDriver()

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

Import

import { fetchHttpDriver } from "@graphrefly/ts/graph";

Signature

function fetchHttpDriver(fetchFn: FetchLike = requireGlobalFetch()): LocalHttpDriver

Parameters

ParameterTypeDescription
fetchFnFetchLikeFetch implementation that returns a response-like object.

Returns

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

Example

import { fetchHttpDriver } from "@graphrefly/ts/graph";

const http = fetchHttpDriver(fetch);

Source

packages/ts/src/graph/environment.ts