Skip to content

breeze-client / configureBreeze

Function: configureBreeze() ​

configureBreeze(options): void

Defined in: src/config/configure.ts:73

Configures Breeze in a single typed call.

Every option is optional, and a Breeze .NET server needs none of them. With no call at all, Breeze uses its default adapters - the backing-store model library, the JSON uri builder and the Web API data service - sends requests through globalThis.fetch, and maps property names with NamingConvention.camelCase.

ts
import { configureBreeze, NamingConvention } from 'breeze-client';

// a server that already sends the names the client should use, with an auth transport
configureBreeze({ namingConvention: NamingConvention.none, fetch: myAuthFetch });

Pass an adapter to replace a default, e.g. configureBreeze({ dataService: MyAdapter }).

This replaces the stringly-typed pairs of config.registerAdapter("dataService", Ctor) and config.initializeAdapterInstance("dataService", "webApi", true). Those still work and are unchanged, but are deprecated.

Parameters ​

options ​

BreezeSetupOptions

Returns ​

void

Released under the MIT License.