Graphql 如何解决gatsby源代码图形ql的问题
我试图将Graphql 如何解决gatsby源代码图形ql的问题,graphql,gatsby,Graphql,Gatsby,我试图将gatsby源代码图ql与我的gatsby JS项目连接起来。但我有错误 无法查询类型“query”上的字段“alladventures” 这是我的API的gatsby配置代码: 这是我的组件代码 graphql` query { alladventures { adventures { title } } site { siteMet
gatsby源代码图ql
与我的gatsby JS项目连接起来。但我有错误
无法查询类型“query”上的字段“alladventures”
这是我的API的gatsby配置代码:
这是我的组件代码
graphql`
query {
alladventures {
adventures {
title
}
}
site {
siteMetadata {
title
description
author
norwayItems {
item {
status {
category
date
season
}
title
location
userName
description1
dates
show {
regular_price
promotional_price
}
rating {
stars
review
adventures
}
mainImage
guideImage
link
}
}
}
}
}
`
)
我必须展示冒险。但我每次都会出错
如果我在这个API中使用这个示例,那么一切都很好
graphql`
query {
alladventures {
adventures {
title
}
}
site {
siteMetadata {
title
description
author
norwayItems {
item {
status {
category
date
season
}
title
location
userName
description1
dates
show {
regular_price
promotional_price
}
rating {
stars
review
adventures
}
mainImage
guideImage
link
}
}
}
}
}
`
)
Schema must contain uniquely named types but contains multiple types named "Query".
Error: Schema must contain uniquely named types but contains multiple types named "Query".