An external system integrates functionality of a product catalog search using Adobe Commerce GraphQL API. The Architect creates a new attribute my_attribute in the admin panel with frontend type select.
Later, the Architect sees that Productinterface already has the field my_atcribute, but returns an mc value. The Architect wants this field to be a new type that contains both option id and label. To meet this requirement, an Adobe Commerce Architect creates a new module and file etc/schema.graphqls that declares as follows:

After calling command setup:upgrade, the introspection of Productlnterface field xy_attribute remains int.
What prevented the value type of field my_attribute from changing?
- The fields of Productlnterface are checked during processing schema.graphqls files. If they have a corresponding attribute, then the backendjype of product attribute is set for field type.
- The interface Productlnterface is already declared in Magento.CatalogGraphQI module. Extending requires use of the keyword -xceni before a new declaration of Productlnterface.
- The Magento.CatalogGraphQI module occurs later in sequence than the Magento.GraphQI module and merging output of dynamic attributes schema reader overrides types declared in schema.graphqls
Answer(s): A
Explanation:
According to the Adobe Commerce Developer Guide1, the fields of ProductInterface are checked during processing schema.graphqls files. If they have a corresponding attribute, then the backend_type of product attribute is set for field type. Therefore, the value type of field my_attribute remains int because it corresponds to the attribute my_attribute that has a frontend type select and a backend_type int.
Reveal Solution Next Question