Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum not resolved in first level input arguments #536

Closed
l-you opened this issue Dec 17, 2022 · 1 comment · Fixed by #561
Closed

Enum not resolved in first level input arguments #536

l-you opened this issue Dec 17, 2022 · 1 comment · Fixed by #561

Comments

@l-you
Copy link
Contributor

l-you commented Dec 17, 2022

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.

@l-you
Copy link
Contributor Author

l-you commented Jan 9, 2023

Closed this issue because I believe root of problem is the same with #531

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant