kotlin_labs v0.1
Experimental directives supported by Apollo Kotlin
Status | Draft |
Version | 0.1 |
This specification provides a list of directives supported by the Apollo Kotlin client. This specification is meant to be used as an incubator for new directives that are still being working on. As the directives mature and can be used by other clients/tools they will be moved to a separate feature‐focused specification.
1@optional
directive @optional(if: Boolean = true) on FIELD | VARIABLE_DEFINITION
2@nonnull
directive @nonnull(fields: String! = "") on OBJECT | FIELD
3@typePolicy
directive @typePolicy(keyFields: String! = "", embeddedFields: String! = "") on OBJECT | INTERFACE | UNION
4@fieldPolicy
directive @fieldPolicy(forField: String!, keyArgs: String! = "", paginationArgs: String! = "") repeatable on OBJECT
5@requiresOptIn
"""
Indicates that the given field, argument, input field or enum value requires
giving explicit consent before being used.
"""
directive @requiresOptIn(feature: String!) repeatable
on FIELD_DEFINITION
| ARGUMENT_DEFINITION
| INPUT_FIELD_DEFINITION
| ENUM_VALUE
6@targetName
directive @targetName(name: String!) on ENUM_VALUE