Skip to content

spec: Directives on variable definitions #60

Open
@saihaj

Description

@saihaj

as per spec https://spec.graphql.org/draft/#ExecutableDirectiveLocation directives can exist on VARIABLE_DEFINITION need to update this.

impl DirectiveLocation {
/// Returns GraphQL syntax compatible name of the directive
pub fn as_str(&self) -> &'static str {
use self::DirectiveLocation::*;
match *self {
Query => "QUERY",
Mutation => "MUTATION",
Subscription => "SUBSCRIPTION",
Field => "FIELD",
FragmentDefinition => "FRAGMENT_DEFINITION",
FragmentSpread => "FRAGMENT_SPREAD",
InlineFragment => "INLINE_FRAGMENT",
Schema => "SCHEMA",
Scalar => "SCALAR",
Object => "OBJECT",
FieldDefinition => "FIELD_DEFINITION",
ArgumentDefinition => "ARGUMENT_DEFINITION",
Interface => "INTERFACE",
Union => "UNION",
Enum => "ENUM",
EnumValue => "ENUM_VALUE",
InputObject => "INPUT_OBJECT",
InputFieldDefinition => "INPUT_FIELD_DEFINITION",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions