Я попытался подключить gatsby-source-graphql
к моему проекту Gatsby JS. Но у меня есть ошибка Cannot query field "alladventures" on type "Query"
.
Это мой код конфигурации gatsby с моим API: https://api.services.activelyme.com/graphql/playground
resolve: `gatsby-source-graphql`,
options: {
// This type will contain remote schema Query type
typeName: `ALLADVENTURES`,
// This is the field under which it's accessible
fieldName: `alladventures`,
// URL to query from
url: `https://api.services.activelyme.com/graphql`,
},
},
Это мой код компонента
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".
Я должен показать приключения. Но я получаю ошибку каждый раз.
Если я использую этот пример с этим API, все работает очень хорошо https://www.gatsbyjs.org/docs/third-party-graphql/