added gql query text: Textinterface

This commit is contained in:
2021-03-09 11:53:59 +01:00
parent 703619955c
commit c05abd7ce5
2 changed files with 10 additions and 0 deletions
@@ -6,6 +6,10 @@ extend type Query {
texts: [TextInterface]
}
extend type Query {
text(id: Int!): TextInterface
}
extend type Query {
textsdepart: [Textref]
}
@@ -142,6 +142,12 @@ class EnFrSchemaExtension extends SdlSchemaExtensionPluginBase {
->map('ids', $builder->fromParent())
)
);
$registry->addFieldResolver('Query', 'text',
$builder->produce('entity_load')
->map('type', $builder->fromValue('node'))
->map('ids', $builder->fromParent())
);
}
// _____ _ ___ _