There seems to be an issue while rendering Union type fields in the explorer
eg:
union UserResult = User | GenericError | IsSuspended
type User {
id ID!
}
type GenericError {
type: String!
message: String!
field: String
}
type IsSuspended {
message: String!
}
type Query {
current_user: UserResult!
}
in the Explorer when you select the query current_user it will give you the list in the union, User & GenericError will select and you can see the object structure, but if you try IsSuspended it will not show you the object structure.
This behaviour changes based on whether if you make message as String! vs String hence I believe there seems to be some issue while dealing with nullability of the fields.
There seems to be an issue while rendering Union type fields in the explorer
eg:
in the Explorer when you select the query
current_user
it will give you the list in the union,User
&GenericError
will select and you can see the object structure, but if you tryIsSuspended
it will not show you the object structure.This behaviour changes based on whether if you make
message
asString!
vsString
hence I believe there seems to be some issue while dealing with nullability of the fields.Originally reported at: https://github.com/hasura/graphql-engine/issues/3101