-
Notifications
You must be signed in to change notification settings - Fork 14
Errors: Must provide an operation. #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for opening an issue! That message says that the module is working but did receive empty If you are making request from your own script, like jQuery, you should send a query parameter with a string in it. Should look something like this. $.post(
'/processwire/setup/graphql/', // change this line if you changed admin path, like '/admin/setup/graphql/'
{
query: "{ home {list { title } } }"
},
function (res) {
console.log(res);
}
); |
Thank you for the module and taking the time to help! I think I am just confused and perhaps have the wrong expectations. With a template graphql containing: $ProcessGraphQL = $modules->get('ProcessGraphQL');
echo $ProcessGraphQL->executeGraphQL(); and a page /graphql I get the error mentioned above. Initially I was expecting this to echo the query defined in the GraphiQL interface. Your example JQuery post works fine, but changing to the public url I have defined returns the same error. $.post(
'/graphql/',
{
query: "{ home {list { title } } }"
},
function (res) {
console.log(res);
}
); Thanks again. |
I think I might know what it is. If you are requesting to First request sends the query. But it won't reach your template file, ProcessWire returns 301. Second request reaches your template, but there is no query in it. Is this your case? |
Right you are, I thought I double checked that testing earlier. Thanks for your help! Looking forward to exploring more now. |
Getting:
when following all instructions to access qraphql on a page. The query is:
Running pw version 3.0.42, most recent ProcessGraphQL, on fresh "Classic" profile.
The text was updated successfully, but these errors were encountered: