Replies: 2 comments 8 replies
-
In If you have this: 'schemas' => [
'default' => [
'query' => [
MyQuery::class, it needs to create the class to figure out the name. If you use this: 'schemas' => [
'default' => [
'query' => [
'myQuery' => MyQuery::class, it should not and thus not call you constructor eagerly. |
Beta Was this translation helpful? Give feedback.
-
I actually had a bit a spare time this week and looked and it and can confirm there's something amiss. From what I gathered:
In my testing on a large project (hundreds of queries, mutations, types), when I tried to fully embrace the Seems the task would be to figure out how to make the schema queries, mutations, etc. also lazy loadable. I've no idea if that can even be done. The underlying libraries docs at https://webonyx.github.io/graphql-php/schema-definition/#lazy-loading-of-types don't give me immediately the impression this would be possible, but maybe the example isn't reflecting the possibilities and it needs more investigation. |
Beta Was this translation helpful? Give feedback.
-
i have Lazy load types enabled but constructor is still running for all types. The field part is not running but constructor for every type is running.
Beta Was this translation helpful? Give feedback.
All reactions