"Ожидается Iterable, но не найден один для поля HolidayPackageType.hotelCategory." - PullRequest
0 голосов
/ 03 марта 2020
     mutation AddHolidayPackages($packageName:String, $destination:String,$country:String,$numberOfNights:Int,
  $citiesCovered:String,$highlights:String,$includes:String,$excludes:String,$dayWiseItinerary:[String],
    $termsandConditions:String,$cancellationPolicy:String,$remarks:String,$notes:String,$images:[String],$hotelCategory:HotelCategoryInput)
    {
  addHolidayPackages(packageName: $packageName,destination:$destination,country:$country,numberOfNights:$numberOfNights,
  citiesCovered:$citiesCovered,highlights:$highlights,includes:$includes,excludes:$excludes,dayWiseItinerary:$dayWiseItinerary,
  termsandConditions:$termsandConditions,cancellationPolicy:$cancellationPolicy,remarks:$remarks,notes:$notes,images:$images,hotelCategory:$hotelCategory)
      {
        packageName,
        destination,
        country,
        numberOfNights,
        citiesCovered,
        highlights,
        includes,
        excludes,
        dayWiseItinerary,
        termsandConditions,
        cancellationPolicy,
        remarks,
        notes,
        images,
        hotelCategory {
          a
          b
          c
          d
          e
        }

      }

    }
    {
  "packageName": "vinay",
  "destination": "Thailand",
  "country": "Thailand",
  "numberOfNights": 5,
  "citiesCovered": "tgr,tht",
  "highlights": "yhtyhjtrtjtjjtjtjtrjng",
  "includes": "ugbtegbtgtbbrihgrhtg",
  "excludes": "bbregrgvrdww fekfjnlnfkef",
  "dayWiseItinerary": [
    "day1 refjrek3fbkjbefkjr",
    "day2:hvrfjvr3ef"
  ],
  "termsandConditions": "hbvfvkjhbvgkjbftg",
  "cancellationPolicy": "ktgkntrljnbtrngb",
  "remarks": "mkntgbntnrbhrkjtgn",
  "notes": "btjgkbtjkbgjtbgkj",
  "images": ["rfvgr","trgtrgh","trgregh"],
  "hotelCategory": {

    "a": [
      {
        "hotelName": "hghtgh","rgrgreg","rgreg",
        "adult": 233,
        "child": 545,
        "infant": 677
      }
    ],
    "b": [
      {
        "hotelName": "hghtgh,"rgrgreg,"rgreg",
        "adult": 233,
        "child": 545,
        "infant": 677
      }
    ],
    "c": [
      {
        "hotelName": "hghtgh","rgrgreg","rgreg",
        "adult": 233,
        "child": 545,
        "infant": 677
      }
    ],
    "d": [
      {
        "hotelName": "hghtgh,rgrgreg,rgreg",
        "adult": 233,
        "child": 545,
        "infant": 677
      }
    ],
    "e": [
      {
        "hotelName": "hghtgh,rgrgreg,rgreg",
        "adult": 233,
        "child": 545,
        "infant": 677
      }
    ]
  }
}

1 Ответ

0 голосов
/ 03 марта 2020

Вы, кажется, используете тип массива вместо типа объекта. Посмотрите на ваши типы (hotelCategoryType) и посмотрите, соответствует ли он вашей мутации или наоборот.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...