简体   繁体   中英

unknown type error in graphql query while fetching content?

I am new in graphql query. I am getting this error unknown type error i

I am hitting this API

My query is

query getCallLogsForLawyer(
  $endDate: end_date!
  $limit: limit!
  $page: page!
  $startDate: start_date!
  $userId: user_id!
) {
  getCallLogsForLawyer(
    end_date: $endDate
    limit: $limit
    page: $page
    start_date: $startDate
    user_id: $userId
  ) {
    _id
  }
}

my variable is this

{
   "endDate":"Mon Jan 10 2022",
   "limit":100101010,
   "page":1,
   "startDate":"Tue Nov 02 2021",
   "userId":"614eb5ef2a89b6fd69fc5ab7"
}

My api Schema is this在此处输入图像描述

Your types are wrong, according to your schema, it should be -

query getCallLogsForLawyer(
  $endDate: String!
  $limit: Float!
  $page: String!
  $startDate: Float!
  $userId: Float!
) {
  getCallLogsForLawyer(
    end_date: $endDate
    limit: $limit
    page: $page
    start_date: $startDate
    user_id: $userId
  ) {
    _id
  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM