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
@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.
@listSizedirective applies slicing arguments to fields. For more information, see The List Size directive.
@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
@scalarParamdirective allows further customization of custom scalar types. For more information, see @scalarParam directive.
Custom scalar types
Datecustom scalar type is used to define custom scalars that specify dates. For more information, see Date Custom Scalar.
DateTimecustom scalar type is used to define custom scalars that specify date and time. For more information, see DateTime Custom Scalar.
JSONcustom scalar type is used to specify JSON payloads. For more information, see JSON Custom Scalar.
Longcustom scalar type enables the use of integers larger than those allowed by
Int. For more information, see Long Custom Scalar.