Variable has an invalid value. Expected type 'Map' but was 'Integer'. Variables for input objects must be an instance of type 'Map' in Dotnet Graphql

Viewed 29

Here is my code to get data from graphql by filtering out data

var listBookings = new GraphQLRequest
    {
        Query = @"
            query  MyQuery($amount_due_at_resort: IntFilterInput, $total_cost: IntFilterInput, $property_id: IntFilterInput) {
  listBookings(where: {amount_due_at_resort: $amount_due_at_resort, total_cost: $total_cost, property_id: $property_id}) {
    amount_due_at_resort
    total_cost
    booking_id
  }
}

",

    Variables = new
       {
         amount_due_at_resort = guest.AmountDueAtResort,       
         property_id = guest.PropertyId,    
         total_cost = guest.TotalAmount,
        }
 };

 var listBookingResponse = await graphQLClient.SendQueryAsync<GetBookingQuery>(listBookings);

I am not able to figure out the solution. Here amount_due_at_resort , total_cost and property id are all int.

0 Answers
Related