Skip to content

Return an error if a schema has repeated directives without the repeatable keyword #509

@pavelnikolov

Description

@pavelnikolov

It was reported in #502 that this library doesn't enforce uniqueness of non-repeatable directives. This is a bug and such a restriction needs to be enforced unless the repeatable keyword is present in the directive definition.

For example, if we are given two directives:

directive @repeatabledirective repeatable on SCALAR
directive @otherdirective on SCALAR

Then only the first one (i.e. @repeatabledirective) can be repeated multiple times on the same scalar type. If we repeat the @otherdirective more than once, then that should result in an error.

The issue is considered resolved when only directives declared as repeatable can be repeated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions