graphql / graphql/graphql-spec
positional (unnamed) arguments
- Dominant language
- JavaScript
- Stars
- 14.6k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
In my experience there are many cases where it is beneficial to be able to have a directive with a single unnamed argument:
```graphql
@import("some import specification") instead of @import(defs: "some import specification")
@default("some default value") instead of @default(value: "some default value")
@calculated("some expression") instead of @calculated(expression: "some expression")
```
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
1. Has positional arguments been discussed before?
2. Does anyone else have use cases that would benefit from positional arguments?
Contributor guide
Assessment
This issue has not been assessed yet.