DanielBiegler / DanielBiegler/bieglers-vendure-plugins
Add example of how to extend `search` query with image hashes
- Dominant language
- TypeScript
- Stars
- 14
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Search results dont return "true" assets, first of all they return the [`SearchResult`](https://docs.vendure.io/current/core/reference/graphql-api/shop/object-types#searchresult) type which holds a special [`SearchResultAsset`](https://docs.vendure.io/reference/graphql-api/shop/object-types#searchresultasset) which by default looks like the following, for both the product-/ and variant-asset:
```graphql
type SearchResultAsset {
id: ID!
preview: String!
focalPoint: Coordinate
}
```
Hence, if you want preview image hashes in your response you need to extend the types manually and your search implementation to include the hashes
A concrete example for the README would be nice
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the README and the linked SearchResult and SearchResultAsset GraphQL definitions. Document how to extend the asset types and the search implementation so preview image hashes appear in the response. Done means the README contains a concrete, usable example for product and variant assets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100