Closed
Description
Implement unions in graphql
As a developer I want to be able to implement unions in the Magento graphql schema language following the specification https://spec.graphql.org/June2018/#sec-Unions
Acceptance criteria:
allow a syntax like the following:
union CompanyStructureEntity
@doc(description: "some kind of union")
@typeResolver(class: "Magento\\Module\\Resolver") =
CompanyTeam | Customer
{code}
Allow and resolve a query with proper types representing each type in union like the following:
{code:java}
{
company {
structure {
items {
id
parent_id
entity {
__typename
... on Customer {
firstname
lastname
}
... on CompanyTeam {
name
}
}
}
}
}
}