Skip to content

Commit e2bb877

Browse files
authored
ENGCOM-5933: Add Store Name to Config Schema #952
2 parents d17fc9c + 7380be7 commit e2bb877

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

app/code/Magento/StoreGraphQl/etc/graphql/di.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,11 @@
2323
</argument>
2424
</arguments>
2525
</type>
26+
<type name="Magento\StoreGraphQl\Model\Resolver\Store\StoreConfigDataProvider">
27+
<arguments>
28+
<argument name="extendedConfigData" xsi:type="array">
29+
<item name="store_name" xsi:type="string">store/information/name</item>
30+
</argument>
31+
</arguments>
32+
</type>
2633
</config>

app/code/Magento/StoreGraphQl/etc/schema.graphqls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ type StoreConfig @doc(description: "The type contains information about a store
3030
secure_base_link_url : String @doc(description: "Secure base link URL for the store")
3131
secure_base_static_url : String @doc(description: "Secure base static URL for the store")
3232
secure_base_media_url : String @doc(description: "Secure base media URL for the store")
33+
store_name : String @doc(description: "Name of the store")
3334
}

dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigResolverTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ protected function setUp()
3030

3131
/**
3232
* @magentoApiDataFixture Magento/Store/_files/store.php
33+
* @magentoConfigFixture default_store store/information/name Test Store
3334
*/
3435
public function testGetStoreConfig()
3536
{
@@ -62,7 +63,8 @@ public function testGetStoreConfig()
6263
secure_base_url,
6364
secure_base_link_url,
6465
secure_base_static_url,
65-
secure_base_media_url
66+
secure_base_media_url,
67+
store_name
6668
}
6769
}
6870
QUERY;
@@ -89,5 +91,6 @@ public function testGetStoreConfig()
8991
$response['storeConfig']['secure_base_static_url']
9092
);
9193
$this->assertEquals($storeConfig->getSecureBaseMediaUrl(), $response['storeConfig']['secure_base_media_url']);
94+
$this->assertEquals('Test Store', $response['storeConfig']['store_name']);
9295
}
9396
}

0 commit comments

Comments
 (0)