Skip to content

Enum not resolved in first level input arguments #536

Closed

Description

@l-you

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.

Activity

  1. reopened this on Dec 17, 2022
  2. l-you commented on Jan 9, 2023

    @l-you
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions