【发布时间】:2018-12-25 19:36:42
【问题描述】:
我有一个 GraphQL 查询,我可以使用 GraphQL 操场完美地运行它。
但是,当我将它放在 Gatsby 页面中时,它会引发错误并且不会提供进一步的诊断。
export const query = graphql`
query($path: String!) {
cms {
headerActions: callToActions(
where: { placement: Header, AND: { pages_some: { path: $path } } }
) {
url
label
}
}
}
`
错误:
error GraphQL Error Expected a value matching type `[CMS_CallToActionWhereInput!]`, but got an object value
我不知道该往哪个方向挖掘,因为 Gatsby 没有给出任何错误细节。
【问题讨论】: