Open justlevine opened 3 years ago
@bordoni What is the performance benefit of using static
in this case?
I ask because I've never seen resolve
return as static in WPGraphQL or any of its extensions I've worked with, and I'm under the (possibly false) impression that static methods are actually slower than instantiated ones in php 7.2+ (but no idea if that holds true on a callable
)
@justlevine @bordoni I don't think there are any here since most resolvers don't get called on each request and this would automatically allocate a small amount of CPU/RAM to this static closure on each request, even the ones where it doesn't get called.
@kidunot89 ultimately I even took it further, and went with setting the IDs on the model for use on the connection interface.
Feel free to change whatever you want on this PR or even just close it.
This PR fixes
organizers
so it returns null if no organizers are set for the event. Fixes #13