docs: clarify limitations in query brands guide (#11980)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user