forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/2.3-develop' into 2.3-develop-pr41
- Loading branch information
Showing
4 changed files
with
87 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> | ||
<type name="Magento\StoreGraphQl\Model\Resolver\Store\StoreConfigDataProvider"> | ||
<arguments> | ||
<argument name="extendedConfigData" xsi:type="array"> | ||
<item name="head_shortcut_icon" xsi:type="string">design/head/shortcut_icon</item> | ||
<item name="default_title" xsi:type="string">design/head/default_title</item> | ||
<item name="title_prefix" xsi:type="string">design/head/title_prefix</item> | ||
<item name="title_suffix" xsi:type="string">design/head/title_suffix</item> | ||
<item name="default_description" xsi:type="string">design/head/default_description</item> | ||
<item name="default_keywords" xsi:type="string">design/head/default_keywords</item> | ||
<item name="head_includes" xsi:type="string">design/head/includes</item> | ||
<item name="demonotice" xsi:type="string">design/head/demonotice</item> | ||
<item name="header_logo_src" xsi:type="string">design/header/logo_src</item> | ||
<item name="logo_width" xsi:type="string">design/header/logo_width</item> | ||
<item name="logo_height" xsi:type="string">design/header/logo_height</item> | ||
<item name="logo_alt" xsi:type="string">design/header/logo_alt</item> | ||
<item name="welcome" xsi:type="string">design/header/welcome</item> | ||
<item name="absolute_footer" xsi:type="string">design/footer/absolute_footer</item> | ||
<item name="copyright" xsi:type="string">design/footer/copyright</item> | ||
</argument> | ||
</arguments> | ||
</type> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
lib/internal/Magento/Framework/GraphQl/Query/IntrospectionConfiguration.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\Framework\GraphQl\Query; | ||
|
||
use Magento\Framework\App\DeploymentConfig; | ||
|
||
/** | ||
* Class for fetching the availability of introspection queries | ||
*/ | ||
class IntrospectionConfiguration | ||
{ | ||
private const CONFIG_PATH_DISABLE_INTROSPECTION = 'graphql/disable_introspection'; | ||
|
||
/** | ||
* @var DeploymentConfig | ||
*/ | ||
private $deploymentConfig; | ||
|
||
/** | ||
* @param DeploymentConfig $deploymentConfig | ||
*/ | ||
public function __construct( | ||
DeploymentConfig $deploymentConfig | ||
) { | ||
$this->deploymentConfig = $deploymentConfig; | ||
} | ||
|
||
/** | ||
* Check the the environment config to determine if introspection should be disabled. | ||
* | ||
* @return bool | ||
*/ | ||
public function isIntrospectionDisabled(): bool | ||
{ | ||
return (bool)$this->deploymentConfig->get(self::CONFIG_PATH_DISABLE_INTROSPECTION); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters