Version 4.7.6

This commit is contained in:
Neo committed 2025-12-19 16:05:19 -08:00
1 parent 8ba7d43898
commit 7b7404e741
1085 files changed
+30590 -7837

No files matched your search

+9 -3
View File
@@ -494,14 +494,19 @@ class SchemaExtender
'locations' => $directive->locations,
'args' => static::extendArgs($directive->args),
'astNode' => $directive->astNode,
'isRepeatable' => $directive->isRepeatable,
]);
}
/**
* @param array<string, bool> $options
*/
public static function extend(Schema $schema, DocumentNode $documentAST, array $options = []) : Schema
{
public static function extend(
Schema $schema,
DocumentNode $documentAST,
array $options = [],
?callable $typeConfigDecorator = null
) : Schema {
if (! (isset($options['assumeValid']) || isset($options['assumeValidSDL']))) {
DocumentValidator::assertValidSDLExtension($documentAST, $schema);
}
@@ -579,7 +584,8 @@ class SchemaExtender
}
throw new Error('Unknown type: "' . $typeName . '". Ensure that this type exists either in the original schema, or is added in a type definition.', [$typeName]);
}
},
$typeConfigDecorator
);
static::$extendTypeCache = [];