Hi there,
when I go to my site/graphql I get the following error:
GraphQL Request must include at least one of those two parameters: \"query\" or \"queryId
Does anyone know why? I can't really go any further until I can access the data!
Thank you
I had same error before because I use GET in stead of POST. If you use POST, then you should recheck your query string ( must start with: query ... )
Do it like this:
{sitename.com}/graphql?query={stuff that's in your graphiql query}
For example, to get all posts of a specific category: query={category(id: "asdfh3e2"){posts{nodes{title}}}}
Play around with the GraphiQL IDE to find out the queries that go inside /graphql?query={}
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi there,
when I go to my site/graphql I get the following error:
GraphQL Request must include at least one of those two parameters: \"query\" or \"queryId
Does anyone know why? I can't really go any further until I can access the data!
Thank you
I had same error before because I use GET in stead of POST.
If you use POST, then you should recheck your query string ( must start with: query ... )
Do it like this:
{sitename.com}/graphql?query={stuff that's in your graphiql query}
For example, to get all posts of a specific category:
query={category(id: "asdfh3e2"){posts{nodes{title}}}}
Play around with the GraphiQL IDE to find out the queries that go inside /graphql?query={}