1
0
Fork 0
mirror of synced 2024-09-30 01:08:13 +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] = [
'type' => $type,
'description' => $props['description'],
'resolve' => fn($object, $args, $context, $info) => new CoroutinePromise(
fn($resolve, $reject) => $resolve($object[$key])
),
'resolve' => fn($object, $args, $context, $info) => $object[$key],
];
}
}