如何获得底部参数顶部解析器

时间:2020-09-21 13:00:04

标签: graphql apollo-server

这是我的代码

我的graphql查询

query(
  $numberOfDesiredElementsDescriptionOfTours: GetDesiredElementsFromAnArrayInput!
  $numberOfDesiredElementsToursDescription: GetDesiredElementsFromAnArrayInput!
) {
  my {
    getUser {
      descriptionOfTours {
        tours(
          numberOfDesiredElementsDescriptionOfTours: $numberOfDesiredElementsDescriptionOfTours
        ) {
          toursDescription {
            tours(
              numberOfDesiredElementsToursDescription: $numberOfDesiredElementsToursDescription
            ) {
              id
            }
          }
        }
      }
    }
  }
}

我需要在getUser中获取参数numberOfDesiredElementsDescriptionOfTours, numberOfDesiredElementsToursDescription

我使用了软件包graphql-parse-resolve-info获取参数numberOfDesiredElementsDescriptionOfTours, numberOfDesiredElementsToursDescription

结果是很长的code。是否有一种简短的方法来获取参数?

0 个答案:

没有答案