diff --git a/src/GraphQL/ObjectGraphQlEx.php b/src/GraphQL/ObjectGraphQlEx.php index e410850..0f3f8cf 100644 --- a/src/GraphQL/ObjectGraphQlEx.php +++ b/src/GraphQL/ObjectGraphQlEx.php @@ -65,4 +65,14 @@ class ObjectGraphQlEx extends Extension // TODO: GraphQL form response /element/*id*/action return $req->requestVar('SecurityID') || $req->httpMethod() === 'POST' || preg_match('!element/([0-9]+)/([A-z]+)!', $req->getURL()); } + + public function isLegacy() + { + $object = $this->owner; + + return $object->config()->get('legacy') || in_array($object->ClassName, [ + RedirectorPage::class, + ErrorPage::class, + ]); + } }