获取内容时 graphql 查询中出现未知类型错误?
unknown type error in graphql query while fetching content?
我是 graphql 查询的新手。我收到此错误 未知类型错误 i
我正在打这个API
我的查询是
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
}
}
我的变量是这个
{
"endDate":"Mon Jan 10 2022",
"limit":100101010,
"page":1,
"startDate":"Tue Nov 02 2021",
"userId":"614eb5ef2a89b6fd69fc5ab7"
}
我的 api 架构是这样的
你的类型不对,根据你的schema,应该是-
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
}
}
我是 graphql 查询的新手。我收到此错误 未知类型错误 i
我正在打这个API
我的查询是
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
}
}
我的变量是这个
{
"endDate":"Mon Jan 10 2022",
"limit":100101010,
"page":1,
"startDate":"Tue Nov 02 2021",
"userId":"614eb5ef2a89b6fd69fc5ab7"
}
我的 api 架构是这样的
你的类型不对,根据你的schema,应该是-
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
}
}