Skip to content

fix(v4): support filters on wrapped relations - #559

Open
BayBreezy wants to merge 1 commit into
nuxt-modules:mainfrom
BayBreezy:fix/494-relation-filter-types
Open

BayBreezy wants to merge 1 commit into
nuxt-modules:mainfrom
BayBreezy:fix/494-relation-filter-types

Conversation

@BayBreezy

Copy link
Copy Markdown
Contributor

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Models using Strapi 4 response wrappers for relations reject valid filters such as parent.slug. The filter type followed data.attributes from the response structure. A v4-specific filter type now accepts direct relation fields while retaining existing accepted typings. These queries typecheck without casts; runtime requests are unchanged. Fixes #494.

Verified: lint, typecheck, all 44 tests, build, and strict checks of the generated declarations. Regression coverage includes recursive/nullable relations, compatibility, invalid inputs, and query serialization.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)

@pkg-pr-new

pkg-pr-new Bot commented Oct 16, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@nuxtjs/strapi@559

commit: 63e4bb4

This branch has not been deployed

No deployments
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.

Defining Type for relations breaks typescript when creating filters

1 participant