docs: clarify limitations in query brands guide (#11980)

This commit is contained in:
Shahed Nasser
2025-03-25 16:50:00 +02:00
committed by GitHub
parent c8389834a1
commit 80e320e094
3 changed files with 10476 additions and 10452 deletions
@@ -66,6 +66,12 @@ Any product that is linked to a brand will have a `brand` property in its object
By using the `fields` query parameter, you don't have to re-create existing API routes to get custom data models that you linked to core data models.
### Limitations: Filtering by Brands in Existing API Routes
While you can retrieve linked records using the `fields` query parameter of an existing API route, you can't filter by linked records.
Instead, you'll have to create a custom API route that uses Query to retrieve linked records with filters, as explained in the [Query documentation](../../../fundamentals/module-links/query/page.mdx#apply-filters-and-pagination-on-linked-records).
---
## Approach 2: Use Query to Retrieve Linked Records
@@ -152,6 +158,12 @@ This returns the brands in your store with their linked products. For example:
}
```
### Limitations: Filtering by Brand in Query
While you can use Query to retrieve linked records, you can't filter by linked records.
For an alternative approach, refer to the [Query documentation](../../../fundamentals/module-links/query/page.mdx#apply-filters-and-pagination-on-linked-records).
---
## Summary