-
-
Notifications
You must be signed in to change notification settings - Fork 570
Closed
Labels
Description
I was experimenting with lazy loading types again after discovering #557 (query typeloader doc only confused the matter, sorry), and I was happy to find that it worked well - handy when you're trying to return cached query results, and you only want to load the relevant types in the schema to figure out the queryPlan.
Anyway, I did notice that listOf(...lazy type...); was not working at the moment:
PHP Fatal error: Uncaught TypeError: Argument 1 passed to GraphQL\\Type\\Definition\\Type::listOf() must be an instance of GraphQL\\Type\\Definition\\Type, instance of Closure given
And it seems you can't pass a Closure as a lazy loaded query type in Schema() either:
PHP Fatal error: Uncaught Error: Closure object cannot have properties in vendor/webonyx/graphql-php/src/Type/Schema.php:138
Any of this sound familiar?