mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-25 06:16:05 +03:00
Replaced instanceof check with is_array for shorthand notation of field definitions (as instanceof might be pretty slow)
This commit is contained in:
parent
5148c3bf03
commit
fc37515ec2
@ -95,7 +95,7 @@ class FieldDefinition
|
|||||||
{
|
{
|
||||||
$map = [];
|
$map = [];
|
||||||
foreach ($fields as $name => $field) {
|
foreach ($fields as $name => $field) {
|
||||||
if ($field instanceof Type) {
|
if (!is_array($field)) {
|
||||||
$field = ['type' => $field];
|
$field = ['type' => $field];
|
||||||
}
|
}
|
||||||
if (!isset($field['name'])) {
|
if (!isset($field['name'])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user