Rayfin

Deprecations

APIs, settings, and flags deprecated or removed in recent Rayfin releases with their replacements, and how to silence Rayfin's deprecation warnings.

Use this page when you upgrade a Rayfin project or see a deprecation warning. The tables list what changed and what to use instead; the Changelog has the full upgrade steps for each release.

Removed or changed in 2.0

2.0 is a major release. Its removals have no compatibility shims, so code that uses them no longer compiles or runs. See Upgrade to 2.0.

OldUse insteadStatus
new RayfinClient(config) and the default export of @microsoft/rayfin-clientRayfinClient.create({ baseUrl, publishableKey, auth, services }). See @microsoft/rayfin-client.Removed in 2.0
ConnectorsRayfinClientRegister connectorsService({ configs, runtime }) from @microsoft/rayfin-connectors. See Wiring connectors.Removed in 2.0
ExtendableRayfinClient and RayfinClientBase subclassesSynchronous service factories in services, such as storageService().Removed in 2.0
RayfinServerClientRayfinClient.create({ ..., auth: suppliedToken({ accessToken }) }).Removed in 2.0
@microsoft/rayfin-client/experimentalThe main @microsoft/rayfin-client entry plus adapters from their owning packages.Removed in 2.0
Client options authStorage, persistSession, autoRefreshToken, multiTabSyncbrowserSession({ storage, persistSession, autoRefreshToken, multiTabSync }) from @microsoft/rayfin-auth.Removed in 2.0
Client options accessToken, getAccessToken, onRefreshNeeded, onAuthExhaustedsuppliedToken({ accessToken }), or a custom auth factory.Removed in 2.0
useProxy on the clientbaseUrl: ''. RayfinClient.create rejects useProxy with INVALID_CONFIG.Removed in 2.0
EntitySchema, TypedDataClients, FunctionsSchema, and connector types imported from @microsoft/rayfin-clientImport them from @microsoft/rayfin-data, @microsoft/rayfin-functions, and @microsoft/rayfin-connectors.Removed in 2.0
@microsoft/rayfin-core/experimental@microsoft/rayfin-core for blob, StorageObject, ContentTypes, bytes, kb, mb, gb, BlobFolderOptions, ByteSize, MimeGlob, and the claims types.Removed in 2.0
@microsoft/rayfin-core/decorators and deep dist/ imports into any packageThe package root or another documented entry point.Removed in 2.0
Storage prefix option on upload, download, list, and deletePass the full relative object path, such as 'users/42/avatar.png'; list(directoryPath) takes the directory. See Storage.Removed in 2.0
RAYFIN_FEATURE_FLAGS=storageNothing. Storage is generally available.Removed in 2.0
Connector type: kusto, @microsoft/rayfin-connector-kusto, kusto(), and Kusto* typestype: eventhouse with auth.type: application, @microsoft/rayfin-connector-eventhouse, eventhouse(), and Eventhouse* types. See Eventhouse.Removed in 2.0
Raw KQL in Eventhouse executeQuery({ query }) and executeCommand({ command })Saved queries in the connector's additionalPayload, called with { queryId, parameters }.Changed in 2.0
To-many relationship selections without a marker, such as 'notes.title''notes[].title'. To-one paths such as 'notebook.name' are unchanged. See Querying.Changed in 2.0
Reading non-key fields from findById, findMany, or findFirst results.select([...]) the fields you need; those helpers return the primary key only.Changed in 2.0
Relying on the client to turn "true"/"false" and ISO date strings into booleans and Date objectsConvert selected values explicitly; results are typed Date | string and boolean | 'true' | 'false'. See Field types.Changed in 2.0
TypeScript 5.0–5.7.1, 6.0.0, or 6.0.1 for schema compilationTypeScript ^5.7.2 or ^6.0.2.Changed in 2.0
@microsoft/fabric-user-data-functions at a version older than the CLIThe exact CLI version. The 2.0 CLI blocks older workers before type generation or deployment.Changed in 2.0

Deprecated or removed in 1.36

OldUse insteadStatus
ctx.getToken(AudienceType.Sql) in a functionDeclare the audience — RayfinContext<Schema, AudienceType.Sql> — and read ctx.Tokens.Sql. See Connections.Deprecated in 1.36
ctx.getSecret('API_KEY') in a functionctx.Secrets.API_KEY, after declaring the secret with rayfin secret set API_KEY --describe="...". See Secrets in functions.Deprecated in 1.36
Enabled Functions with no services.functions.authservices.functions.auth.type: application. Function connections now run as the app identity.Changed in 1.36
AudienceType.CosmosDB, KeyVault, EventGrid, Kusto, WorkIQNo replacement audience. For services that accept keys, store a credential with rayfin secret set.Removed in 1.36
entity, field decorators, and RayfinPrimaryKey from @microsoft/rayfin-core/experimentalImport them from @microsoft/rayfin-core. In 1.36 only blob and the storage helpers stayed on the experimental path, which 2.0 removed.Removed in 1.36
Source and AutoGenerated from @microsoft/rayfin-core/experimentalImport them from @microsoft/rayfin-connectors.Removed in 1.36
ConnectorsRayfinClient from @microsoft/rayfin-client/experimentalIn 1.36, import it from @microsoft/rayfin-client. 2.0 removed the class and the experimental path; register connectorsService() instead.Deprecated in 1.36
services.connectors.enabled in rayfin.ymlRemove it. The rayfin connector commands are always available.Deprecated in 1.36
RAYFIN_FEATURE_FLAGS=functions or =connectorsNothing. Functions and connectors no longer need a flag.Removed in 1.36
rayfin connector add --type kustoKeep existing Kusto connectors; 1.36 stopped new ones from being added. 2.0 renamed the type to eventhouse.Changed in 1.36
Storage per-call options such as onProgress and onConflict, and the StorageConflictMode / UploadProgressEvent exportsSee Storage for the current client surface.Removed in 1.36

Deprecated in 1.35.1

OldUse insteadStatus
services.staticHosting.anonymousAccessservices.staticHosting.assetAccess: protected or public. rayfin up removes the old key when it records the new one. See Hosting.Deprecated in 1.35.1

Deprecated before 1.35

OldUse insteadWarning code
The useProxy client optionSet baseUrl instead: an empty string ('') keeps requests same-origin so a dev-server proxy can forward them, and an absolute URL calls the backend directly. useProxy has no effect on ApiClient, and 2.0's RayfinClient.create rejects it.RAYFIN_DEP_USE_PROXY

How deprecation warnings work

Rayfin emits a deprecation warning when your application uses an API or option that will change in a future release. Warnings are printed with console.warn and include a stable code such as [RAYFIN_DEP_USE_PROXY], so you can search your codebase for the affected usage. TypeScript also marks deprecated members, such as ctx.getToken(), with @deprecated, so your editor strikes them through.

Silence warnings in application code

Call setDeprecationsSilenced(true) once you've reviewed the warnings and want to hide them for a specific environment. Import it from @microsoft/rayfin-client and call it early in application startup, before calling RayfinClient.create or using deprecated APIs.

import { setDeprecationsSilenced } from '@microsoft/rayfin-client';

setDeprecationsSilenced(true);

Call setDeprecationsSilenced(false) to turn warnings back on, and isDeprecationSilenced() to check the current setting:

import { isDeprecationSilenced } from '@microsoft/rayfin-client';

console.log(isDeprecationSilenced());

Silence warnings in Node.js

For Node.js scripts, tests, or server-side tooling, set RAYFIN_NO_DEPRECATION to 1 or true in the environment:

RAYFIN_NO_DEPRECATION=1 npm test

Silence warnings in browser apps

Browser environments have no Node.js process environment, so RAYFIN_NO_DEPRECATION has no effect there. Use the programmatic toggle instead, and call it during application startup — before any code path that could emit a deprecation warning runs.

src/main.ts
import { setDeprecationsSilenced } from '@microsoft/rayfin-client';

if (import.meta.env.PROD) {
  setDeprecationsSilenced(true);
}

See also

Something wrong on this page?Report an issueEdit this page

On this page