Skip to content

spec: Directives on variable definitions #60

Open
@saihaj

Description

@saihaj
Contributor

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",

Activity

linked a pull request that will close this issue on Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @saihaj

      Issue actions

        spec: Directives on variable definitions · Issue #60 · graphql-rust/graphql-parser