overblog / GraphQLBundle

This bundle provides tools to build a complete GraphQL API server in your Symfony App.
MIT License
788 stars 222 forks source link

ResolveInfo injection in Query #1191

Closed Vincz closed 3 months ago

Vincz commented 3 months ago
Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Documented? yes
Fixed tickets #1186
License MIT

This PR allows to inject the ResolveInfo into a query or mutation just by adding it to the list of auto-guessed arguments.

Exemple:

#[Query]
public function test(int $id, ResolveInfo $info) {

}

It only works with annotations/attributes and auto-guess parameters when the query resolver is auto-generated.

AlexOstrovsky commented 3 months ago

@mcg-web can you please check and review this PR. we need this to update to latest version of this bundle. Thank you very much.

AlexOstrovsky commented 3 months ago

@mcg-web any update on this please?

mcg-web commented 3 months ago

Thank you @Vincz, also sorry for the late review !

AlexOstrovsky commented 2 months ago

@mcg-web can you also please create a release with this feature? Thanks