Skip to content

Directive definition compatibility #2

@Quramy

Description

@Quramy

We can't the original @argumentDefinitions and @arguments directive definitions.

## (A)
directive @arguments(
  # There must be name(s) of arguments of this directive
) on FRAGMENT_SPREAD

However, what are the names of arguments of @arguments ? They might be named in client-side developer's source code, such as:

query MyQuery($todoCount: Int!) {
  ...TodosFragment @argument(count: $todoCount)
}

The problem is that the directive definition (A) can't know the directive's arguments input name is count. In other words, The argument name of the directive should be fixed name. For example:

scalar ArgumentDefinitionSet
directive @arguments(
  _defs: ArgumentDefinitionSet
) on FRAGMENT_SPREAD

The above example is absolutely valid( https://graphql.github.io/graphql-spec/June2018/#sec-Type-System.Directives ).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions