We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc04b8a commit 068ff02Copy full SHA for 068ff02
Command/DumpSchemaCommand.php
@@ -66,12 +66,16 @@ private function sortSchema(): void
66
$refl = new \ReflectionProperty(TypeWithFields::class, 'fields');
67
$refl->setAccessible(true);
68
69
- $fields = $config->query->getFields();
70
- ksort($fields);
71
- $refl->setValue($config->query, $fields);
+ if ($config->query) {
+ $fields = $config->query->getFields();
+ ksort($fields);
72
+ $refl->setValue($config->query, $fields);
73
+ }
74
- $fields = $config->mutation->getFields();
75
- $refl->setValue($config->mutation, $fields);
+ if ($config->mutation) {
76
+ $fields = $config->mutation->getFields();
77
78
+ $refl->setValue($config->mutation, $fields);
79
80
}
81
0 commit comments