-
-
Notifications
You must be signed in to change notification settings - Fork 562
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
Create field args mapper and cache args resolution #1587
base: master
Are you sure you want to change the base?
Create field args mapper and cache args resolution #1587
Conversation
Co-authored-by: Benedikt Franke <[email protected]>
Co-authored-by: Benedikt Franke <[email protected]>
Any idea why phpstan could be falling? I can't run it locally to test, because for some reason it requires php8.2 and I have php8.3 locally. |
Can you not see the output in https://github.com/webonyx/graphql-php/actions/runs/10038021756/job/27739070572?pr=1587?
GitHub also inlines the errors for me: |
I see it, just don't understand it. And why same code passes check with php7.4 & 8.0 but fails with 8.1, 8.2 & 8.3? |
Locally:
🤷 |
Sorry to bother you, can we merge this? :) |
Small enhancement/performance optimization + new feature.
We already have input parse value which turns array into something user defined, but same thing for field args' is missing.
And because this could be something expensive (for example - user might validate if args are within defined boundaries) - it doesn't make sense to call that mapper (or even the code that collects the args) more than once for same input. (For example in sub fields of iterable - args won't change in between each iterable).
Did brief test on performance optimization - it was about 15ms on ~800 calls - not something big, but I believe its good to have it - it will be beneficial even to users that doesn't use that args mapper.