craftql icon indicating copy to clipboard operation
craftql copied to clipboard

GraphiQL - "Unable to verify your data submission."

Open phantomramen opened this issue 6 years ago • 4 comments

I can't seem to get any feedback or documentation on GraphiQL. I have had it running before on older versions of Craft in the same environment.

When I load it up the Query result section reads: { "error": "Unable to verify your data submission." }

And the Document Explorer reads: No schema available.

The browser console is giving the error : POST http://example.com/admin/craftql/browse/example.com/example.com/api 400 (Bad Request)

That url looks a bit fishy aye 🤔

I can run the example hello world curl command fine.

Homestead - 8.0.1 PHP - 7.1.26 CraftCMS Solo - 3.1.5 CraftQL - 1.3.0

phantomramen avatar Jan 28 '19 17:01 phantomramen

@dannyryanuk have you set up your API token and given that user token the appropriate permissions to query or mutate data?

I received this exact error when trying to run a query with a user that was not set up with an API token.

pauloelias avatar Feb 04 '19 20:02 pauloelias

This also could be coming from your settings. In the HTML of the /admin/craftql/browse page is the following JS,

return fetch('$siteUrl/$uri', {

There, $siteUrl comes from the default Site URL set in the craft config and $uri comes from the CraftQL settings.

Can you let me know what (and how) your site URL is being set?

markhuot avatar Feb 06 '19 19:02 markhuot

So I'm having the same issue as @dannyryanuk. I have set up the api token as @pauloelias has suggested and getting the same errors{ "error": "Unable to verify your data submission." }. The base url is set to $DEFAULT_SITE_URL. This is a local install as I am in the development phase of project.

Query: { entries(section: "brand") { title } }

Results: { "error": "Unable to verify your data submission." }

Console error: :451 POST http://site-domain/admin/craftql/site-domain/api 400 (Bad Request) browse?query={ entries(section%3A "brand") { title } }

System:

PHP version | 7.2.8 Darwin 18.6.0 MySQL 5.7.23 GD 7.2.8 Craft Solo 3.1.29

CraftQL | 1.3.2

Any help would be greatly appreciated.

CraftQL - PRA Health Sciences Brand Guide 2019-07-03 17-17-32

cmmize avatar Jul 03 '19 21:07 cmmize

Same issue here.

Works fine in production (linux).

PHP version 7.3.4 MySQL version 5.7.25 Craft Version 3.3.7

Running on laravel homestead on windows.

sunscreem avatar Oct 09 '19 18:10 sunscreem