kotlin_labs v0.1

Experimental directives supported by Apollo Kotlin

StatusRelease
Version0.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

§Index

  1. @fieldPolicy
  2. @nonnull
  3. @optional
  4. @requiresOptIn
  5. @targetName
  6. @typePolicy
  1. 1@optional
  2. 2@nonnull
  3. 3@typePolicy
  4. 4@fieldPolicy
  5. 5@requiresOptIn
  6. 6@targetName
  7. §Index