schema.graphqls 1.7 KB

123456789101112131415161718192021222324252627
  1. # Copyright © Magento, Inc. All rights reserved.
  2. # See COPYING.txt for license details.
  3. type Query {
  4. customAttributeMetadata(attributes: [AttributeInput!]!): CustomAttributeMetadata @resolver(class: "Magento\\EavGraphQl\\Model\\Resolver\\CustomAttributeMetadata") @doc(description: "The customAttributeMetadata query returns the attribute type, given an attribute code and entity type")
  5. }
  6. type CustomAttributeMetadata @doc(description: "CustomAttributeMetadata defines an array of attribute_codes and entity_types") {
  7. items: [Attribute] @doc(description: "An array of attributes")
  8. }
  9. type Attribute @doc(description: "Attribute contains the attribute_type of the specified attribute_code and entity_type") {
  10. attribute_code: String @doc(description: "The unique identifier for an attribute code. This value should be in lowercase letters without spaces.")
  11. entity_type: String @doc(description: "The type of entity that defines the attribute")
  12. attribute_type: String @doc(description: "The data type of the attribute")
  13. attribute_options: [AttributeOption] @resolver(class: "Magento\\EavGraphQl\\Model\\Resolver\\AttributeOptions") @doc(description: "Attribute options list.")
  14. }
  15. type AttributeOption @doc(description: "Attribute option.") {
  16. label: String @doc(description: "Attribute option label.")
  17. value: String @doc(description: "Attribute option value.")
  18. }
  19. input AttributeInput @doc(description: "AttributeInput specifies the attribute_code and entity_type to search") {
  20. attribute_code: String @doc(description: "The unique identifier for an attribute code. This value should be in lowercase letters without spaces.")
  21. entity_type: String @doc(description: "The type of entity that defines the attribute")
  22. }