Skip to content

Graphorin API reference v0.4.0


Graphorin API reference / @graphorin/provider / / createProvider

Function: createProvider()

ts
function createProvider(adapter, options?): Provider;

Defined in: packages/provider/src/provider.ts:73

Wrap an adapter in the canonical Provider shape. Adapters returned by the bundled factories already implement Provider; passing them through createProvider(...) is the recommended entry point because it keeps the construction site documented and gives downstream middleware a single attachment surface.

Parameters

ParameterType
adapterProvider
optionsCreateProviderOptions

Returns

Provider

Example

ts
const provider = createProvider(vercelAdapter(model), {
  acceptsSensitivity: ['public', 'internal'],
});

Stable