scorpion / ProcessGraphQL

GraphQL for ProcessWire
MIT License
0 stars 0 forks source link

DMZ Broken #1

Open brettwilcox opened 2 years ago

brettwilcox commented 2 years ago

Need to change the assets to address DMZ mode.

https://github.com/scorpion/ProcessGraphQL/blob/530a72e349d7a262d26af9452f5681fa36ee5d33/ProcessGraphQL.module#L135

brettwilcox commented 2 years ago

Unable to use application when offline due to script fetching from outside network.

brettwilcox commented 2 years ago

From my old notes

/** Check if in debub mode and setup returned assets */
$ext = $this->config->debug ? "development" : "production.min";
// GraphiQL 1.0.x is causing issues where the 'History' and 'Docs" will not be collapsed properly
// after a page reload. I suspect it's how graphiql js is initialized from partial.php
$this->config->scripts->add($this->config->urls->templates . "js/es6-promise.auto.min.js");
$this->config->scripts->add($this->config->urls->templates . "js/fetch.umd.js");
$this->config->scripts->add($this->config->urls->templates . "js/react.$ext.js");
$this->config->scripts->add($this->config->urls->templates . "js/react-dom.$ext.js");
$this->config->scripts->add($this->config->urls->templates . "js/graphiql.min.js");
$this->config->styles->add($this->config->urls->templates . 'css/graphiql.min.css');

// Original
$this->config->scripts->add("https://unpkg.com/es6-promise@4.2.8/dist/es6-promise.auto.min.js");
$this->config->scripts->add("https://unpkg.com/whatwg-fetch@3.0.0/dist/fetch.umd.js");
$this->config->scripts->add("https://unpkg.com/react@16.12.0/umd/react.production.min.js");
$this->config->scripts->add("https://unpkg.com/react-dom@16.12.0/umd/react-dom.production.min.js");
$this->config->scripts->add('https://unpkg.com/graphiql@0.14.2/graphiql.min.js');
$this->config->styles->add('https://unpkg.com/graphiql@0.14.2/graphiql.css');