ConfigInterface.php 942 B

1234567891011121314151617181920212223242526272829303132333435
  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;
  8. use Magento\Framework\GraphQl\Config\ConfigElementInterface;
  9. /**
  10. * Access all GraphQL type information declared in the schema's configuration.
  11. *
  12. * Data includes types, interfaces they implement, their arguments, and fields.
  13. */
  14. interface ConfigInterface
  15. {
  16. /**
  17. * Get config element as an object by its name.
  18. *
  19. * @param string $configElementName
  20. * @return ConfigElementInterface
  21. */
  22. public function getConfigElement(string $configElementName) : ConfigElementInterface;
  23. /**
  24. * Return all type names declared in a GraphQL schema's configuration and their type.
  25. *
  26. * Format is ['name' => 'example value', 'type' = 'example value']
  27. *
  28. * @return array $types
  29. */
  30. public function getDeclaredTypes() : array;
  31. }