added samples to search result card
This commit is contained in:
@@ -70,6 +70,7 @@ type SearchResult {
|
||||
images: [Image]
|
||||
visuels: [Image]
|
||||
reference: String
|
||||
samples: [Sample]
|
||||
}
|
||||
|
||||
type Product {
|
||||
|
@@ -342,6 +342,12 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
|
||||
->map('path', $builder->fromValue('field_reference.value'))
|
||||
);
|
||||
|
||||
$registry->addFieldResolver('SearchResult', 'samples',
|
||||
$builder->produce('property_path')
|
||||
->map('type', $builder->fromValue('entity:node'))
|
||||
->map('value', $builder->fromParent())
|
||||
->map('path', $builder->fromValue('field_samples'))
|
||||
);
|
||||
}
|
||||
|
||||
// ___ _
|
||||
|
Reference in New Issue
Block a user