-
Notifications
You must be signed in to change notification settings - Fork 222
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
Merge guessed argument properties and args described with GQL\Arg #1151
Conversation
When a single argument is described with `#[GQL\Arg]` all other are not guessed anymore This commit starts by guessing all arguments and override the ones that have `#[GQL\Arg]` attributes describing them
@mathroc to answer your questions:
You are right, we could also explore the possibility to set attributes directly on the arguments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make the attributes have the final word on type and default value
and for the last question, I can answer it by looking at the tests: yes sometimes the guessing can't work at all, e.g.: arrays 🤔 |
Yes, and we want an error when we don't have a corresponding |
How should the arguments be ordered? if it has any importance) |
@mathroc The GraphQL arguments order doesn't matter as they are named. But we need them in the right order when the PHP method is called. |
ok, I think the PR is fine then, let me know if there's anything to do. (should I squash the commits?) |
When a single argument is described with
#[GQL\Arg]
all other are not guessed anymoreThis commit starts by guessing all arguments and override the ones that have
#[GQL\Arg]
attributes describing themI'm not sure of a few things:
in the future it would be nice if we could add the attribute on the argument directly instead of the method so we could make the name & type optional there (or forbidden?)