FieldInterface.php 885 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\Framework\GraphQl\Config\Element;
  8. use Magento\Framework\GraphQl\Config\ConfigElementInterface;
  9. /**
  10. * Defines contract for fields data as GraphQL objects.
  11. */
  12. interface FieldInterface extends ConfigElementInterface
  13. {
  14. /**
  15. * Get the type's configured name.
  16. *
  17. * @return string
  18. */
  19. public function getTypeName() : string;
  20. /**
  21. * Return true if argument is a list of input items, otherwise false if it is a single object/scalar.
  22. *
  23. * @return bool
  24. */
  25. public function isList(): bool;
  26. /**
  27. * Return true if argument is required when invoking the query where the argument is specified. False otherwise.
  28. *
  29. * @return bool
  30. */
  31. public function isRequired(): bool;
  32. }