0

The query below works in GraphiQL Playground. When I put it into my Python script and execute the script I get below message:

gql.transport.exceptions.TransportQueryError: {'message': 'Variable idCustomer_chk is required.', 'locations': [{'line': 1, 'column': 40}], 'extensions': {'code': 'HC0018', 'variable': 'idCustomer_chk'}}

This variable is declared and used in query. When I remove that argument and run the script it works. Seems to only fail with Decimal arguments. When I change it to Int! I get a message back stating expecting Type Decimal.

'code': 'HC0018' looks to come from HotChocolate, which states "Variable xyz is required."

Not sure what that message is referring to since that variable is in the query trying to be executed.

Any one have any ideas on what that message means and/or why when executing it is expecting a decimal and not an integer? Column is defined as a NUMBER in database.

query check_it($tid_chk: String $sourceSys_chk: String $idCustomer_chk: Decimal!  ) 
    {VMI_DEV_Dhh 
                  {            Consumption(where: {tid: {eq: $tid_chk} sourceSys: {eq: $sourceSys_chk} idCustomer: {eq: $idCustomer_chk} } idSupplier: {eq: $idSupplier_chk} }  ) 
      {  items 
        { id }
      }
    }}
Hrvoje
  • 13,566
  • 7
  • 90
  • 104
  • Column is defined as a NUMBER in database. - in what DB? You should specify that in your question. – Hrvoje May 04 '22 at 12:14
  • Make sure you have idCustomer_chk defined all the way (in GraphQL/Python/DB). You might want to extract all unique values for that field to see what data type you actually need. – Hrvoje May 04 '22 at 12:18
  • idCustomer_chk is a non-null decimal ... so you need to pass it in and it cannot be null. – Michael Ingmar Staib May 04 '22 at 14:50

0 Answers0