user5711656
user5711656

Reputation: 3678

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 enter image description here

Upvotes: 2

Views: 3507

Answers (1)

andy mccullough
andy mccullough

Reputation: 9601

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
  }
}

Upvotes: 2

Related Questions