Resolve fields directly
This commit is contained in:
parent
d07fff5c3e
commit
e3824170b1
1 changed files with 1 additions and 3 deletions
|
@ -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])
|
|
||||||
),
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue