product query by slug returns only 1 asset
See original GitHub issueDescribe the bug
When executing the product
query with the slug
argument, only a single Asset is returned.
To Reproduce Steps to reproduce the behavior:
- Set up a Product with multiple Assets
- Query it using
{ product(slug: "laptop") { assets { id } } }
- Only a single asset is returned.
Expected behavior
Should return all assets. Querying by id
behaves correctly.
Environment (please complete the following information):
- @vendure/core version: 1.0.0-beta.7
- Nodejs version: any
- Database (mysql/postgres etc): any
Additional context Possibly introduced in commit 2ace0eb0
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Products | HTTP API
Name of the Product. User-defined identifier used in a deep-link URL for the Product. It must be unique across a Project, but a...
Read more >Custom Query and sorting issue
I have created a shortcode with a custom query and I'm using it on many pages. Basically, I'm displaying products by the current...
Read more >JetEngine: Query Builder WC Product Query Type
WC Product Query type of Query Builder from the JetEngine plugin allows you to create a customizable product list that is safe to...
Read more >Querying for content - Contentful Developer Documentation
Get multiple assets. Getting multiple assets is similar to getting multiple entries. The only real difference is that the methods are not generic...
Read more >Linked entries and assets in Contentful | Contentful
The one limitation of the Contentful Delivery API to bear in mind is that it will only return linked entries up to a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Checked, you are totally right,
getOne()
operates withentities
, notrows
. Sorry for thus bug!Hopefully I didn’t introduce a new bug - as far as i know the TypeORM
getOne()
method will automatically limit the results of the select to a single entity, even when the query might yield multiple results.