Skip to content

Commit 3ec2374

Browse files
committed
Mark Framework GraphQL interfaces as API
update update update update update Update TypeMetaReaderInterface.php Revert change the return type of this function
1 parent 04e674b commit 3ec2374

32 files changed

+78
-20
lines changed

lib/internal/Magento/Framework/GraphQl/Config/ConfigElementFactoryInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
/**
1111
* Responsible for translating data produced by configuration readers to config objects
12+
*
13+
* @api
1214
*/
1315
interface ConfigElementFactoryInterface
1416
{

lib/internal/Magento/Framework/GraphQl/Config/ConfigElementInterface.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@
99

1010
/**
1111
* GraphQL config element.
12+
*
13+
* @api
1214
*/
1315
interface ConfigElementInterface
1416
{
1517
/**
1618
* @return string
1719
*/
18-
public function getName() : string;
20+
public function getName(): string;
1921

2022
/**
2123
* @return string
2224
*/
23-
public function getDescription() : string;
25+
public function getDescription(): string;
2426
}

lib/internal/Magento/Framework/GraphQl/Config/Element/Field.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
* Class representing 'field' GraphQL config element.
1212
*
1313
* Fields are used to describe possible values for a type/interface.
14+
*
15+
* @api
1416
*/
1517
class Field implements OutputFieldInterface
1618
{

lib/internal/Magento/Framework/GraphQl/Config/Element/FieldInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
/**
1313
* Defines contract for fields data as GraphQL objects.
14+
*
15+
* @api
1416
*/
1517
interface FieldInterface extends ConfigElementInterface
1618
{
@@ -19,7 +21,7 @@ interface FieldInterface extends ConfigElementInterface
1921
*
2022
* @return string
2123
*/
22-
public function getTypeName() : string;
24+
public function getTypeName(): string;
2325

2426
/**
2527
* Return true if argument is a list of input items, otherwise false if it is a single object/scalar.

lib/internal/Magento/Framework/GraphQl/Config/Element/OutputFieldInterface.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
/**
1111
* Defines contract for output fields data as GraphQL objects.
12+
*
13+
* @api
1214
*/
1315
interface OutputFieldInterface extends FieldInterface
1416
{
@@ -17,12 +19,12 @@ interface OutputFieldInterface extends FieldInterface
1719
*
1820
* @return string
1921
*/
20-
public function getResolver() : string;
22+
public function getResolver(): string;
2123

2224
/**
2325
* Get the list of arguments configured for the field. Return an empty array if no arguments are configured.
2426
*
2527
* @return Argument[]
2628
*/
27-
public function getArguments() : array;
29+
public function getArguments(): array;
2830
}

lib/internal/Magento/Framework/GraphQl/Config/Element/TypeInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
/**
1313
* Defines contracts for return type data as GraphQL objects.
14+
*
15+
* @api
1416
*/
1517
interface TypeInterface extends ConfigElementInterface
1618
{
@@ -19,5 +21,5 @@ interface TypeInterface extends ConfigElementInterface
1921
*
2022
* @return Field[]
2123
*/
22-
public function getFields() : array;
24+
public function getFields(): array;
2325
}

lib/internal/Magento/Framework/GraphQl/Config/Element/UnionInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
/**
1313
* Defines the contract for the union configuration data type.
14+
*
15+
* @api
1416
*/
1517
interface UnionInterface extends ConfigElementInterface
1618
{

lib/internal/Magento/Framework/GraphQl/ConfigInterface.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111

1212
/**
1313
* Access all GraphQL type information declared in the schema's configuration.
14-
*
1514
* Data includes types, interfaces they implement, their arguments, and fields.
15+
*
16+
* @api
1617
*/
1718
interface ConfigInterface
1819
{
@@ -22,7 +23,7 @@ interface ConfigInterface
2223
* @param string $configElementName
2324
* @return ConfigElementInterface
2425
*/
25-
public function getConfigElement(string $configElementName) : ConfigElementInterface;
26+
public function getConfigElement(string $configElementName): ConfigElementInterface;
2627

2728
/**
2829
* Return all type names declared in a GraphQL schema's configuration and their type.
@@ -31,5 +32,5 @@ public function getConfigElement(string $configElementName) : ConfigElementInter
3132
*
3233
* @return array $types
3334
*/
34-
public function getDeclaredTypes() : array;
35+
public function getDeclaredTypes(): array;
3536
}

lib/internal/Magento/Framework/GraphQl/Query/ErrorHandlerInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*
1515
* GraphQL error handler
1616
*
17+
* @api
1718
* @see \Magento\Framework\GraphQl\Query\QueryProcessor
1819
*/
1920
interface ErrorHandlerInterface

lib/internal/Magento/Framework/GraphQl/Query/Resolver/Argument/FieldEntityAttributesInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
/**
1111
* Contract for the classes that retrieve attributes for a given entity configured in @see FieldEntityAttributesPool.
12+
*
13+
* @api
1214
*/
1315
interface FieldEntityAttributesInterface
1416
{
@@ -17,5 +19,5 @@ interface FieldEntityAttributesInterface
1719
*
1820
* @return array
1921
*/
20-
public function getEntityAttributes() : array;
22+
public function getEntityAttributes(): array;
2123
}

lib/internal/Magento/Framework/GraphQl/Query/Resolver/Argument/SearchCriteria/ArgumentApplierInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
/**
1313
* Interface used to apply each argument to a search criteria
14+
*
15+
* @api
1416
*/
1517
interface ArgumentApplierInterface
1618
{
@@ -28,5 +30,5 @@ public function applyArgument(
2830
string $fieldName,
2931
string $argumentName,
3032
array $argument
31-
) : SearchCriteriaInterface;
33+
): SearchCriteriaInterface;
3234
}

lib/internal/Magento/Framework/GraphQl/Query/Resolver/BatchRequestItemInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
/**
1313
* One of requests for a batch resolver to process.
14+
*
15+
* @api
1416
*/
1517
interface BatchRequestItemInterface
1618
{

lib/internal/Magento/Framework/GraphQl/Query/Resolver/BatchResolverInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
/**
1313
* Resolve multiple requests of the same field gathered by GraphQL.
14+
*
15+
* @api
1416
*/
1517
interface BatchResolverInterface
1618
{

lib/internal/Magento/Framework/GraphQl/Query/Resolver/BatchResponse.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
/**
1111
* Contains responses for batch requests.
12+
*
13+
* @api
1214
*/
1315
class BatchResponse
1416
{

lib/internal/Magento/Framework/GraphQl/Query/Resolver/BatchServiceContractResolverInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
/**
1313
* Resolve multiple brunches/leaves by executing a batch service contract.
14+
*
15+
* @api
1416
*/
1517
interface BatchServiceContractResolverInterface
1618
{

lib/internal/Magento/Framework/GraphQl/Query/Resolver/ContextInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
*
1515
* GraphQL will pass the same instance of this interface to each field resolver, so these resolvers could have
1616
* shared access to the same data for ease of implementation purposes.
17+
*
18+
* @api
1719
*/
1820
interface ContextInterface
1921
{

lib/internal/Magento/Framework/GraphQl/Query/Resolver/IdentityInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
/**
1111
* IdentityInterface is responsible for generating the proper tags from a cache tag and resolved data.
12+
*
13+
* @api
1214
*/
1315
interface IdentityInterface
1416
{
@@ -21,5 +23,5 @@ interface IdentityInterface
2123
* @param array $resolvedData
2224
* @return string[]
2325
*/
24-
public function getIdentities(array $resolvedData) : array;
26+
public function getIdentities(array $resolvedData): array;
2527
}

lib/internal/Magento/Framework/GraphQl/Query/Resolver/ResolveRequestInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
/**
1414
* Request for a resolver.
15+
*
16+
* @api
1517
*/
1618
interface ResolveRequestInterface
1719
{

lib/internal/Magento/Framework/GraphQl/Query/Resolver/TypeResolverInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
/**
1313
* Determines a concrete GraphQL type for data returned that implements an interface type.
14+
*
15+
* @api
1416
*/
1517
interface TypeResolverInterface
1618
{

lib/internal/Magento/Framework/GraphQl/Query/Resolver/Value.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
/**
1313
* Return value for @see ResolverInterface
14+
*
15+
* @api
1416
*/
1517
class Value extends \GraphQL\Deferred
1618
{

lib/internal/Magento/Framework/GraphQl/Query/ResolverInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
/**
1616
* Resolver fetches the data and formats it according to the GraphQL schema.
17+
*
18+
* @api
1719
*/
1820
interface ResolverInterface
1921
{

lib/internal/Magento/Framework/GraphQl/Schema.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
/**
1111
* Schema object for a GraphQL endpoint describing queries and types for a client to consume.
12+
*
13+
* @api
1214
*/
1315
class Schema extends \GraphQL\Type\Schema
1416
{

lib/internal/Magento/Framework/GraphQl/Schema/SchemaGeneratorInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
/**
1313
* GraphQL schema generator interface.
14+
*
15+
* @api
1416
*/
1517
interface SchemaGeneratorInterface
1618
{
@@ -19,5 +21,5 @@ interface SchemaGeneratorInterface
1921
*
2022
* @return Schema
2123
*/
22-
public function generate() : Schema;
24+
public function generate(): Schema;
2325
}

lib/internal/Magento/Framework/GraphQl/Schema/Type/Entity/MapperInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
/**
1111
* Produces mapped GraphQL type names to their respective entity models.
12+
*
13+
* @api
1214
*/
1315
interface MapperInterface
1416
{
@@ -18,5 +20,5 @@ interface MapperInterface
1820
* @param string $entityName
1921
* @return string[]
2022
*/
21-
public function getMappedTypes(string $entityName) : array;
23+
public function getMappedTypes(string $entityName): array;
2224
}

lib/internal/Magento/Framework/GraphQl/Schema/Type/Enum/DataMapperInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
/**
1111
* Produces mapped name to values for the Enum types to be map them against the data that comes from a database.
12+
*
13+
* @api
1214
*/
1315
interface DataMapperInterface
1416
{
@@ -18,5 +20,5 @@ interface DataMapperInterface
1820
* @param string $enumName
1921
* @return string[]
2022
*/
21-
public function getMappedEnums(string $enumName) : array;
23+
public function getMappedEnums(string $enumName): array;
2224
}

lib/internal/Magento/Framework/GraphQl/Schema/Type/InputTypeInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111

1212
/**
1313
* Interface for GraphQl InputType only used for input
14+
*
15+
* @api
1416
*/
1517
interface InputTypeInterface extends \GraphQL\Type\Definition\InputType, TypeInterface
1618
{
17-
1819
}

lib/internal/Magento/Framework/GraphQl/Schema/Type/Output/ElementMapper/FormatterInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
/**
1414
* Converter of GraphQL config elements to the objects compatible with GraphQL schema generator.
15+
*
16+
* @api
1517
*/
1618
interface FormatterInterface
1719
{

lib/internal/Magento/Framework/GraphQl/Schema/Type/OutputTypeInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111

1212
/**
1313
* Interface for GraphQl OutputType only used for output
14+
*
15+
* @api
1416
*/
1517
interface OutputTypeInterface extends \GraphQL\Type\Definition\OutputType, TypeInterface
1618
{
17-
1819
}

lib/internal/Magento/Framework/GraphQl/Schema/Type/ResolveInfo.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
/**
1111
* Wrapper for GraphQl ResolveInfo
12+
*
13+
* @api
1214
*/
1315
class ResolveInfo extends \GraphQL\Type\Definition\ResolveInfo
1416
{

lib/internal/Magento/Framework/GraphQl/Schema/Type/WrappedTypeInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111

1212
/**
1313
* Interface for GraphQl WrappedType used to wrap other types like array or not null
14+
*
15+
* @api
1416
*/
1517
interface WrappedTypeInterface extends \GraphQL\Type\Definition\WrappingType, TypeInterface
1618
{
17-
1819
}

lib/internal/Magento/Framework/GraphQl/Schema/TypeInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
/**
1111
* Marker interface for all types compatible with GraphQL schema generator.
12+
*
13+
* @api
1214
*/
1315
interface TypeInterface
1416
{
15-
1617
}

0 commit comments

Comments
 (0)