System Information
- Strapi Version: 4
- Operating System: Windows pro
- Database: SQLite
- Node Version: 14.16.1
- NPM Version: /
- Yarn Version: 1.22.10
Hi,
I don’t know if one topic already talk about it, but I have a problem and solution I haven’t found it yet.
The problem is with Graphql, on my windows (I just want test Strapi v4 with Graphql and Next js before use Docker or Linux). May be the solution is to don’t use Windows , but I’m not sure if Windows is the source of my problem.
What I expected:
query allPosts{
posts {
title
}
}
The error :
{
"error": {
"errors": [
{
"message": "Cannot query field \"title\" on type \"PostEntityResponseCollection\".",
"locations": [
{
"line": 3,
"column": 5
}
],
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED",
"exception": {
"stacktrace": [
"GraphQLError: Cannot query field \"title\" on type \"PostEntityResponseCollection\".",
....
I need to do this query :
query allPosts{
posts {
data {
attributes {
title
}
}
}
}
I just want to know if this is normal or not? If not, why do I have this problem? I’m waiting for this query because all documentations use this kind of query (first query “What I expected”).
In doubt, sorry for the duplicate topic and my english.
Ty in advance