silverstripe / silverstripe-graphql

Serves Silverstripe data as GraphQL representations
BSD 3-Clause "New" or "Revised" License
52 stars 61 forks source link

SortPlugin exception #540

Closed lekoala closed 1 year ago

lekoala commented 1 year ago

Recently ran into this

[Emergency] Uncaught SilverStripe\GraphQL\Schema\Exception\SchemaBuilderException: Failed to apply plugin SilverStripe\GraphQL\Schema\Plugin\SortPlugin to children. Got error "Callable array ( 0 => 'SilverStripe\AssetAdmin\GraphQL\Resolvers\FolderTypeResolver', 1 => 'sortChildren', 2 => 'SilverStripe\AssetAdmin\GraphQL\Resolvers\FolderTypeResolver', 3 => 'sortChildren', 4 => 'SilverStripe\AssetAdmin\GraphQL\Resolvers\FolderTypeResolver', 5 => 'sortChildren', 6 => 'SilverStripe\AssetAdmin\GraphQL\Resolvers\FolderTypeResolver', 7 => 'sortChildren', ) provided to SilverStripe\GraphQL\Schema\Resolver\ResolverReference is not valid"

not sure when/what i did wrong, but the error message is not very helpful :) it was working fine before so it's probably a recent change on my end, that works fine in yml, but somehow leads to errors in the graphql.

commenting the code generating the error and everything seems to work fine

lekoala commented 1 year ago

cleared my cache folder a couple of time, and now it seems to work fine... not sure what went wrong, it seems the yml was appended instead of being replaced