ziyaDev
ziyaDev

Reputation: 31

gqlcodegen Error: Missing Required Field Argument "PignationCustomerOrder" for "Orders" Field

I'm encountering an issue while using gqlcodegen where it's throwing an error stating that the field argument "PignationCustomerOrder" for the "orders" field is required, but it seems not to be provided. Strangely, when I execute the same query using Postman, everything works as expected.

Here's the error message I'm receiving:


Error 1: Field "orders" argument "pignation" of type "PignationCustomerOrder!" is required, but it was not provided.

I'm puzzled by this because in my GraphQL query, I am indeed providing the "pignation" argument for the "orders" field. Here's a simplified version of my query:

query GetCustomerInfo($customer: String!, $pignation: PignationCustomerOrder!) {
  get_customer_info_st(customer: $customer) {
    id
    # other fields
    orders(pignation: $pignation) {
      id
      # other fields
    }
  }
}

When I test this query using Postman, it works perfectly fine and returns the expected results. However, when I try to generate types using gqlcodegen, it throws the mentioned error.

Could someone please help me understand why gqlcodegen is not recognizing the provided "PignationCustomerOrder" argument for the "orders" field? Is there something I might be missing in my gqlcodegen setup or configuration?

Upvotes: 0

Views: 80

Answers (0)

Related Questions