1
0
Fork 0
mirror of synced 2024-09-30 09:18:14 +13:00

Resolve fields directly

This commit is contained in:
Jake Barnby 2022-05-02 19:44:59 +12:00
parent d07fff5c3e
commit e3824170b1
No known key found for this signature in database
GPG key ID: A4674EBC0E404657

View file

@ -104,9 +104,7 @@ class Builder
$fields[$escapedKey] = [ $fields[$escapedKey] = [
'type' => $type, 'type' => $type,
'description' => $props['description'], 'description' => $props['description'],
'resolve' => fn($object, $args, $context, $info) => new CoroutinePromise( 'resolve' => fn($object, $args, $context, $info) => $object[$key],
fn($resolve, $reject) => $resolve($object[$key])
),
]; ];
} }
} }