-
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
[Feat] allow omitting resolver alias in tag config #134
Comments
Allow omitting resolver and mutation method in tag config overblog#134
Ok I understand the need, is true that the bundle require a lot of configuration, we must work on a flow to ease |
I was about checking out to make a PR, this was the fastest reaction I ever experienced! AppBundle\GraphQL\Resolver\WorkflowsResolver:
class: AppBundle\GraphQL\Resolver\WorkflowsResolver
tags:
- { name: overblog_graphql.resolver, method: '__invoke', alias: 'AppBundle\GraphQL\Resolver\WorkflowsResolver' } Should be defaulted from: services:
AppBundle\GraphQL\Resolver\WorkflowsResolver:
class: AppBundle\GraphQL\Resolver\WorkflowsResolver
tags:
- { name: overblog_graphql.resolver } This could be the default behavior without BC break. And with some extras, like the DunlasActionBundle it would be possible to auto-tag & wire so you don`t even need to provide this. I think it should not be be tied to another bundle, but it saves already boilerplate without. The usage of the bundle can be proposed in docs as a best practice to even save more, if you agree.
|
This is awesome! Implementing this could helps win a lot of time. DunglasActionBundle is a good example... |
This feature has been added to master (release will comes later), here the doc. Thanks again for the idea 👍 |
When omitting alias for an resolver would implicitly set the alias to be equal the service class name, combined with this feature request, a lot of boilerplate configuration could be saved using a bundle like DunglasActionBundle. You would not need to configure any resolver services at all, as long as you implement a single resolve function per class (__invoke).
The text was updated successfully, but these errors were encountered: