added gql query text: Textinterface
This commit is contained in:
@@ -6,6 +6,10 @@ extend type Query {
|
|||||||
texts: [TextInterface]
|
texts: [TextInterface]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extend type Query {
|
||||||
|
text(id: Int!): TextInterface
|
||||||
|
}
|
||||||
|
|
||||||
extend type Query {
|
extend type Query {
|
||||||
textsdepart: [Textref]
|
textsdepart: [Textref]
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -142,6 +142,12 @@ class EnFrSchemaExtension extends SdlSchemaExtensionPluginBase {
|
|||||||
->map('ids', $builder->fromParent())
|
->map('ids', $builder->fromParent())
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$registry->addFieldResolver('Query', 'text',
|
||||||
|
$builder->produce('entity_load')
|
||||||
|
->map('type', $builder->fromValue('node'))
|
||||||
|
->map('ids', $builder->fromParent())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// _____ _ ___ _
|
// _____ _ ___ _
|
||||||
|
|||||||
Reference in New Issue
Block a user