graphQLDeprecatedDirective top-level property

GraphQLDirective graphQLDeprecatedDirective
final

Implementation

final graphQLDeprecatedDirective = GraphQLDirective(
  name: 'deprecated',
  description: 'Marks an element of a GraphQL schema as no longer supported.',
  locations: [
    DirectiveLocation.FIELD_DEFINITION,
    DirectiveLocation.ARGUMENT_DEFINITION,
    DirectiveLocation.INPUT_FIELD_DEFINITION,
    DirectiveLocation.ENUM_VALUE,
  ],
  inputs: [
    GraphQLFieldInput<String, String>(
      'reason',
      graphQLString,
      description:
          'Explains why this element was deprecated, usually also including'
          ' a suggestion for how to access supported similar data.'
          ' Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).',
      defaultValue: DEFAULT_DEPRECATION_REASON,
    ),
  ],
);