mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Resolve fields as top-level promises for fixed passed through types
This commit is contained in:
@@ -100,9 +100,9 @@ class Builder
|
||||
$fields[$escapedKey] = [
|
||||
'type' => $type,
|
||||
'description' => $props['description'],
|
||||
'resolve' => fn ($object, $args, $context, $info) => $object->then(function ($obj) use ($key) {
|
||||
return $obj[$key];
|
||||
}),
|
||||
'resolve' => fn ($object, $args, $context, $info) => new CoroutinePromise(
|
||||
fn($resolve, $reject) => $resolve($object[$key])
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user