You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class RegisterThreadField extends AbstractContainerAwareField
{
/**
* @return ThreadType
*/
public function getType()
{
return new ObjectType([
'name' => 'RegisterThreadMutationType',
'fields' => [
'thread' => [
'type' => new ThreadType()
],
'messagesStatus' => [
'type' => new MessagesStatusType()
]
]
]);
}
public function build(FieldConfig $config)
{
$config->addArguments([
'message_ids' => new ListType(
new IdType()
)
]);
}
public function resolve($value, array $args, ResolveInfo $info)
{
return $this->container
->get('app.resolver.register_thread')
->resolve(new ParameterBag($args));
}
And this is the MessagesStatusType
class MessagesStatusType extends AbstractObjectType
{
/**
* @param \Youshido\GraphQL\Config\Object\ObjectTypeConfig $config
*/
public function build($config)
{
$config->addFields([
'id' => new IdType(),
'oldestMessageDate' => [
'type' => new DateTimeType(),
'resolve' => ['@app.resolver.messages_status','oldestMessageDate']
],
'newestMessageDate' => [
'type' => new DateTimeType(),
'resolve' => ['@app.resolver.messages_status','newestMessageDate']
],
'messagesCount' => [
'type' => new IntType(),
'resolve' => ['@app.resolver.messages_status','messagesCount']
],
'cleanMessagesCount' => [
'type' => new IntType(),
'resolve' => ['@app.resolver.messages_status','cleanMessagesCount']
]
]);
}
The resolver result does not return an index for the messagesStatus field of the query. But, I was expecting that the custom resolvers defined on the MessagesStatusType would take care of that. But it seem that they are not being called.
I have this query:
This is the RegisterThreadField definition:
And this is the MessagesStatusType
The resolver result does not return an index for the messagesStatus field of the query. But, I was expecting that the custom resolvers defined on the MessagesStatusType would take care of that. But it seem that they are not being called.
This is the result:
Should those resolvers (declared as callable services) on the MessagesStatusType class have being called?
The text was updated successfully, but these errors were encountered: