Enum not resolved in first level input arguments
l-you opened this issue · comments
l-you commented
Consider such queries that do the same thing - update order status.
Schema
enum OrderState {
Completed
Failed
Processing
}
input OrderInput {
id: String!
}
input OrderManagementUpdateInput {
state: OrderState = null
}
type Schema {
updateShopOrderPrimaryData(
order: OrderInput!
update: OrderManagementUpdateInput!
): Order!
}
Query 1
mutation updateShopOrderState(
$orderId: String!
$state: OrderState!
) {
updateShopOrderPrimaryData(order: {id: $orderId}, update: {state: $state}) {
...DashboardOrderFields
}
}
Query 2
mutation updateShopOrderPrimaryData(
$orderId: String!
$update: OrderManagementUpdateInput!
) {
updateShopOrderPrimaryData(order: {id: $orderId}, update: $update) {
...DashboardOrderFields
}
}
Actually, issue is that Query 1 throws exception cannot find GraphQL type \"OrderState\". Check your TypeMapper configuration.
Query 2 works just fine when I pass state
field in update
argument .
Actually its the same queries, but they have different client-side structure.
I tried to make reproduction with tests #535 but it seems issue not so obvious.