Open edalzell opened 6 years ago
If you take a look inside the main class of this package, you'll see that the default field resolver is set in the queryAndReturnResult
method.
I don't immediately see an easy way to extend this function and implement a custom default field resolver, but at worst you could simply copy the function definition and re-define the field resolver variable. Note that you'll need to register your own service provider (and, as a result, prevent the package from being autoloaded) and reference the extended version of this file which contains the overridden function. Hope that helps!
Is there a way to change the default resolver?
I'm trying to put GraphQL on top of a CMS where the data on an object is retrieved with
$object->data('fieldname')
I'd love to set that as the default resolver somehow w/o using the config file (the way I've got it set up those files aren't used).
Alternatively, can I set the
resolveField
somehow?