|
7 | 7 | use GraphQL\Directives\GraphQLIncludeDirective;
|
8 | 8 | use GraphQL\Directives\GraphQLSkipDirective;
|
9 | 9 | use GraphQL\Errors\GraphQLError;
|
10 |
| -use GraphQL\Errors\InvalidReturnTypeError; |
11 | 10 | use GraphQL\Fields\GraphQLTypeField;
|
12 | 11 | use GraphQL\Schemas\Schema;
|
13 | 12 | use GraphQL\Types\GraphQLAbstractType;
|
|
18 | 17 | use GraphQL\Utilities\Errors;
|
19 | 18 | use GraphQL\Utilities\LocatedError;
|
20 | 19 | use GraphQL\Utilities\OperationRootType;
|
| 20 | +use GraphQL\Introspection\Introspection; |
21 | 21 |
|
22 | 22 | class Executor
|
23 | 23 | {
|
@@ -634,16 +634,16 @@ private function buildResolveInfo(ExecutionContext $executionContext, GraphQLTyp
|
634 | 634 | private function getFieldDef(Schema $schema, GraphQLObjectType $parentType, string $fieldName)
|
635 | 635 | {
|
636 | 636 | if ($fieldName === "__schema" && $schema->getQueryType() === $parentType) {
|
637 |
| - $SchemaMetaFieldDef = null; |
638 |
| - require __DIR__ . "/../Introspection/Introspection.php"; |
| 637 | + $SchemaMetaFieldDef = Introspection::getSchemaMetaFieldDef(); |
| 638 | + //require __DIR__ . "/../Introspection/Introspection.php"; |
639 | 639 | return $SchemaMetaFieldDef;
|
640 | 640 | } else if ($fieldName === "__type" && $schema->getQueryType() === $parentType) {
|
641 |
| - $TypeMetaFieldDef = null; |
642 |
| - require __DIR__ . "/../Introspection/Introspection.php"; |
| 641 | + $TypeMetaFieldDef = Introspection::getTypeMetaFieldDef(); |
| 642 | + //require __DIR__ . "/../Introspection/Introspection.php"; |
643 | 643 | return $TypeMetaFieldDef;
|
644 | 644 | } else if ($fieldName === "__typename") {
|
645 |
| - $TypeNameMetaFieldDef = null; |
646 |
| - require __DIR__ . "/../Introspection/Introspection.php"; |
| 645 | + $TypeNameMetaFieldDef = Introspection::getTypeNameMetaFieldDef(); |
| 646 | + //require __DIR__ . "/../Introspection/Introspection.php"; |
647 | 647 | return $TypeNameMetaFieldDef;
|
648 | 648 | }
|
649 | 649 | return $parentType->getFields()[$fieldName];
|
|
0 commit comments