简体   繁体   English

获取内容时 graphql 查询中出现未知类型错误?

[英]unknown type error in graphql query while fetching content?

I am new in graphql query.我是 graphql 查询的新手。 I am getting this error unknown type error i我收到此错误未知类型错误我

I am hitting this API我正在打这个 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我的 api 架构是这个在此处输入图像描述

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 GraphQL 查询中的错误显示未知类型“ContentfulSizes” - Error in GraphQL query it says Unknown type "ContentfulSizes" Gatsby Contentful - GraphQL 查询错误:未知类型“ContentfulFixed” - Gatsby Contentful - GraphQL query error: Unknown type "ContentfulFixed" 获取graphql列表时出错 - Getting error while fetching for graphql list 收到错误:类型为“查询” [GraphQL,Relay,React]的字段“用户”上的未知参数“ id” - Getting error : Unknown argument “id” on field “user” of type “Query” [GraphQL, Relay, React] GraphQL 查询未在 React 中成功获取 - GraphQL query not fetching successfully in React Apollo客户端Graphql查询变量类型错误 - Apollo client Graphql query variable type error 您的 GraphQL 查询中出现错误:无法在“StrapiPropiedadesImagen”类型上查询字段“childImageSharp” - There was an error in your GraphQL query: Cannot query field “childImageSharp” on type “StrapiPropiedadesImagen” [GraphQL 错误]:消息:未知片段 - [GraphQL error]: Message: Unknown fragment Apollo Server - GraphQL 错误:只能有一种名为“查询”的类型 - Apollo Server - GraphQL Error: There can be only one type named "Query" 错误未知类型“webform__webform”使用 gatsby-drupal-webform 和 GraphQL - Error Unknown type "webform__webform" using gatsby-drupal-webform & GraphQL
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM