mirror of
https://github.com/retailcrm/graphql-php.git
synced 2025-04-02 20:26:09 +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
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ class FieldDefinition
|
|||
{
|
||||
$map = [];
|
||||
foreach ($fields as $name => $field) {
|
||||
if ($field instanceof Type) {
|
||||
if (!is_array($field)) {
|
||||
$field = ['type' => $field];
|
||||
}
|
||||
if (!isset($field['name'])) {
|
||||
|
|
Loading…
Add table
Reference in a new issue