Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC Arguments by default #41

Open
SerafimArts opened this issue Dec 19, 2017 · 0 comments
Open

RFC Arguments by default #41

SerafimArts opened this issue Dec 19, 2017 · 0 comments

Comments

@SerafimArts
Copy link
Member

SerafimArts commented Dec 19, 2017

Adding default arguments for Fields and Inputs will require syntactic change of the GraphQL queries, so at the run-in phase, the features are enough to implement them at the Directive level.

Usage:

directive @route(action: String! @default) on OBJECT | FIELD 
                                # ^^^^^  Adding "@default" directive

type Query {
    users: [User]! @route("ExampleController@usersAction")
                       # ^^^ Use an optional argument name 
}

Instead of:

directive @route(action: String!) on OBJECT | FIELD 

type Query {
    users: [User]! @route(action: "ExampleController@usersAction")
                        # ^^^^^^  Explicit specification of the argument
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant