Open t1 opened 2 years ago
In a later step, the @GraphQLResult
annotation could take an enum parameter to define the type of wrapping applied. The above default is ERROR_FIELDS
, a second value is UNION
resulting in this schema:
union OrderResult = Order | OrderLocked | OrderNotFound
type OrderLocked {
...
}
type OrderNotFound {
...
}
Discussed in https://github.com/smallrye/smallrye-graphql/discussions/1410
Add a way to configure return types to be wrapped in
Result
types and map the exceptions accordingly.Results in a schema: