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.
Deprecated or removed in 1.36
| Old | Use instead | Status |
|---|---|---|
ctx.getToken(AudienceType.Sql) in a function | Declare the audience — RayfinContext<Schema, AudienceType.Sql> — and read ctx.Tokens.Sql. See Connections. | Deprecated in 1.36 |
ctx.getSecret('API_KEY') in a function | ctx.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.auth | services.functions.auth.type: application. Function connections now run as the app identity. | Changed in 1.36 |
AudienceType.CosmosDB, KeyVault, EventGrid, Kusto, WorkIQ | No 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/experimental | Import them from @microsoft/rayfin-core. Only blob and the storage helpers remain on the experimental path. | Removed in 1.36 |
Source and AutoGenerated from @microsoft/rayfin-core/experimental | Import them from @microsoft/rayfin-connectors. | Removed in 1.36 |
ConnectorsRayfinClient from @microsoft/rayfin-client/experimental | Import it from @microsoft/rayfin-client. The experimental path still re-exports it. | Deprecated in 1.36 |
services.connectors.enabled in rayfin.yml | Remove it. The rayfin connector commands are always available. | Deprecated in 1.36 |
RAYFIN_FEATURE_FLAGS=functions or =connectors | Nothing. Functions and connectors no longer need a flag. | Removed in 1.36 |
rayfin connector add --type kusto | Keep existing Kusto connectors; new ones cannot be added in 1.36. | Changed in 1.36 |
Storage per-call options such as onProgress and onConflict, and the StorageConflictMode / UploadProgressEvent exports | See Storage for the 1.36 client surface. Storage is experimental. | Removed in 1.36 |
Deprecated in 1.35.1
| Old | Use instead | Status |
|---|---|---|
services.staticHosting.anonymousAccess | services.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
| Old | Use instead | Warning code |
|---|---|---|
The useProxy client option | Set 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. | 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 creating Rayfin clients 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 testSilence 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.
import { setDeprecationsSilenced } from '@microsoft/rayfin-client';
if (import.meta.env.PROD) {
setDeprecationsSilenced(true);
}See also
- Changelog for upgrade steps per release.
- Known limitations for current API constraints.
@microsoft/rayfin-clientfor the rest of the client configuration surface.
Known limitations
Current constraints in Rayfin — service availability, functions, connectors, the data client, Data API Builder, relationships, auth, and schema apply — each with a workaround.
Errors and troubleshooting
A symptom-to-fix index of the errors Rayfin builders hit most — deployment, capacity, static hosting, schema apply, secrets, functions, connectors, and Fabric auth.