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

Allow for linked validations to be named differently to property #1181

Closed joesaunderson closed 7 months ago

joesaunderson commented 7 months ago
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes/no
Documented? yes/no
Fixed tickets https://github.com/overblog/GraphQLBundle/issues/1180
License MIT

We were overriding the property variable with the property from the link... this meant that the property (of an input or argument) had to match the property of the linked validation too.

This fixes that, allowing them to be separate, meaning you can have a property named foo and link it to a validation named bar.

Not sure if this is a breaking change... as technically the bug prevented people from having different properties -> entity properties, so there shouldn't be any skew anyway.

joesaunderson commented 7 months ago

@mcg-web @Vincz can I get a review on this please? 🙏

Vincz commented 7 months ago

Hi @joesaunderson! Good catch. Don't think is a BC either. Anyway, that was clearly not intended. Thanks!

joesaunderson commented 7 months ago

Hi @joesaunderson! Good catch. Don't think is a BC either. Anyway, that was clearly not intended.

Thanks!

Thanks @Vincz. Do you know if this issue is intended too? Happy to raise another PR to fix if not.

https://github.com/overblog/GraphQLBundle/issues/1182