2

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

1 Answer 1

2

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
  }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.