You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
@IvanGoncharov thanks for clarifying this, and sorry I didn't see the RFC. I did a lot of searching on google and in the repository but I never came across that. We will build our library on the assumption that ordering is needed but I will follow that RFC and make any needed changes that are late occurring.
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:
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).
The text was updated successfully, but these errors were encountered: