Open sorenbs opened 6 years ago
Sorry this has sat so long. #426 was merged in, which I think answers your question #2, and yes positional arguments was discussed before open sourcing GraphQL.
The primary concern which I'd want to see addressed is schema evolution. So for example:
# Example definition
directive @log(message: String)
# Example usage
@log("wow")
# Future evolution...
directive @log(level: String, message: String)
The schema evolution above of adding an argument to a field/directive is currently considered non-breaking. However supporting the use of unnamed positional args would make adding arguments a breaking change since they would introduce ambiguity.
In my experience there are many cases where it is beneficial to be able to have a directive with a single unnamed argument:
There are multiple ways this could be allowed ranging from a general concept of positional arguments to a narrow special case for directives with a single argument.
Questions