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