Skip to content

fix(core): extend BaseKey to support array types for UUID compatibility#7454

Open
sawirricardo wants to merge 1 commit into
refinedev:mainfrom
sawirricardo:fix/basekey-uuid-support
Open

fix(core): extend BaseKey to support array types for UUID compatibility#7454
sawirricardo wants to merge 1 commit into
refinedev:mainfrom
sawirricardo:fix/basekey-uuid-support

Conversation

@sawirricardo

@sawirricardo sawirricardo commented Jun 12, 2026

Copy link
Copy Markdown

Description

The BaseKey type currently only accepts string | number, which forces users with OpenAPI-generated types (where UUIDs are typed as number[]) to use forced type casting.

This PR extends BaseKey to include string[] and number[]:

// Before
export type BaseKey = string | number;

// After
export type BaseKey = string | number | string[] | number[];

This is a type-only change with no runtime impact. TypeScript compilation passes with no errors.

Closes #7403

General Checklist

@changeset-bot

changeset-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: bb69f96

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

BaseKey type now accepts string[] and number[] in addition to string
and number. This allows OpenAPI-generated types that use number[]
for UUIDs or composite keys to work without forced type casting.

Closes refinedev#7403

Co-Authored-By: AI <noreply@ai.com>
@sawirricardo sawirricardo force-pushed the fix/basekey-uuid-support branch from 72a9eb1 to bb69f96 Compare June 12, 2026 08:07
@sawirricardo sawirricardo changed the title fix(core): extend BaseKey type to support number[] for UUID compatibility fix(core): extend BaseKey to support array types for UUID compatibility Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] BaseKey needs to support UUID

1 participant