Configure the Resolve Function
When defining a Federated schema, you can now set the resolve function in the initializer.
new FederatedSchema([
'query' => $this->queryType,
'mutation' => $this->mutationType,
'types' => $this->typeRegistry->getAll(),
'resolve' => function ($root, $args, $context, $info) {
$adapter = new SyncPromiseAdapter();
$resolver = new FederatedSchemaResolver($root, $args, $context, $info, $adapter);
return $resolver->resolve();
}
]);