Skip to content

Commit 050034e

Browse files
authored
LYNX-198: Set is_default as not nullable in schema
1 parent 7b33900 commit 050034e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

app/code/Magento/EavGraphQl/Model/Output/GetAttributeData.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ function (AttributeOptionInterface $option) use ($attribute) {
108108
return [
109109
'label' => $label,
110110
'value' => $value,
111-
'is_default' => $attribute->getDefaultValue() ?
112-
in_array($value, explode(',', $attribute->getDefaultValue())) : null
111+
'is_default' => in_array($value, explode(',', $attribute->getDefaultValue()))
113112
];
114113
},
115114
$attribute->getOptions()

app/code/Magento/EavGraphQl/etc/schema.graphqls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ interface CustomAttributeMetadataInterface @typeResolver(class: "Magento\\EavGra
9191
interface CustomAttributeOptionInterface @typeResolver(class: "Magento\\EavGraphQl\\Model\\TypeResolver\\AttributeOption") {
9292
label: String! @doc(description: "The label assigned to the attribute option.")
9393
value: String! @doc(description: "The attribute option value.")
94-
is_default: Boolean @doc(description: "Is the option value default.")
94+
is_default: Boolean! @doc(description: "Is the option value default.")
9595
}
9696

9797
type AttributeOptionMetadata implements CustomAttributeOptionInterface @doc(description: "Base EAV implementation of CustomAttributeOptionInterface.") {

0 commit comments

Comments
 (0)