Skip to content

Order of @Directives relevant or not #590

Closed
@jjn1056

Description

@jjn1056

While working on the GraphQL implementation for Perl we are pondering if the order of Directives (where there is more than one) is important and should be preserved or not. I can't see to find anything in the specifications. Here's a use case I might have:

type User {
  first: String! @length(max: 50)
  last: String! @length(max: 50)
  nickname: String! @lowercase @unique
}

In this case I have a custom directive that requires the nickname to be unique but also that I have a filter that lower cases the nickname. Clearly to properly check the uniqueness I'd want to normalize the incoming data first. Possibly this is an abuse of the Directives system :) However I think it would be wise for the specification to clearly indicate if order is relevant and should be preserved (and processed in order) or if order should definitely not be counted on for 'pipelining' directives (in which my above use case is invalid and should be avoided).

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