-
Notifications
You must be signed in to change notification settings - Fork 222
fix(field-resolver): re-add support for isser methods #720
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
Conversation
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.
Thank you @Kocal
Will it work when the field is called |
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.
some PHP CS fix required
@ruudk yes because we test isser before public property. |
@mcg-web Maybe this explain it better: https://3v4l.org/tfb8l |
Maybe a fix could be to add another } elseif (null !== $getter = self::guessObjectMethod($objectOrArray, $fieldName, '')) { // prefix is empty so it will try `isValid()`
$value = $objectOrArray->$getter();
} |
Maybe the best fix to this issue is to add an optional ResolverPropertyAccess that required |
Hmm, then I'd rather have this PR merged, and I will fix these "special" cases on my side.... feels like a missing feature to me but don't want to further complicate GraphQLBundle project with having to support 2 types of property access resolvers. |
Both options are fine for me |
Ok, I'll merge this one! anyway you can use config to define your custom default field resolver
|
Thanks for merging. Is it too soon to ask for a tagged release 🙈 😂 ? |
@ruudk I'm going also to (re-)introduce before release since it is also present on master. |
I'm updating from 0.11 to 0.13 on our big app at work, and we have a lot of errors on fields which depend of isser methods.
Isser methods support has been removed in 0.13, because the Symfony PropertyAccessor has been removed too, due to performance issue for large schema.
However, I think it can be nice to re-add a basic support out-of-the-box for issers.
What do you think?
Thanks!