GraphQL custom schema directives and scalar types
The API Connect DataPower® API Gateway extends the GraphQL specification by providing additional schema directives and custom scalar types.
Custom schema directives
@cost- The
@costdirective associates weight values with types or fields. Types are used to calculate type cost of a request to the GraphQL API. Fields are used to calculate field cost of a request to the GraphQL API. For more information, see The Cost Directive. @listSize- The
@listSizedirective applies slicing arguments to fields. For more information, see The List Size directive. @remove- The
@removeGraphQL schema directive specifies conditions for removing types and fields from validation or introspection for each transaction based on values in the API context. For more information, see @remove directive @scalarParam- The
@scalarParamdirective allows further customization of custom scalar types. For more information, see @scalarParam directive.
Custom scalar types
Date- The
Datecustom scalar type is used to define custom scalars that specify dates. For more information, see Date Custom Scalar. DateTime- The
DateTimecustom scalar type is used to define custom scalars that specify date and time. For more information, see DateTime Custom Scalar. JSON- The
JSONcustom scalar type is used to specify JSON payloads. For more information, see JSON Custom Scalar. Long- The
Longcustom scalar type enables the use of integers larger than those allowed byInt. For more information, see Long Custom Scalar.