Skip to content

Commit e18edcc

Browse files
LYNX-160: Rename queries to avoid conflicts with PWA package (#105)
1 parent 65fd385 commit e18edcc

File tree

13 files changed

+41
-36
lines changed

13 files changed

+41
-36
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ enum AttributeEntityTypeEnum {
432432
CUSTOMER_ADDRESS
433433
}
434434

435-
type CustomerAttributeMetadata implements AttributeMetadataInterface @doc(description: "Customer attribute metadata.") {
435+
type CustomerAttributeMetadata implements CustomAttributeMetadataInterface @doc(description: "Customer attribute metadata.") {
436436
input_filter: InputFilterEnum @doc(description: "The template used for the input of the attribute (e.g., 'date').")
437437
multiline_count: Int @doc(description: "The number of lines of the attribute value.")
438438
sort_order: Int @doc(description: "The position of the attribute in the form.")

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

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22
# See COPYING.txt for license details.
33

44
type Query {
5-
customAttributeMetadata(attributes: [AttributeInput!]! @doc(description: "An input object that specifies the attribute code and entity type to search.")): CustomAttributeMetadata @resolver(class: "Magento\\EavGraphQl\\Model\\Resolver\\CustomAttributeMetadata") @doc(description: "Return the attribute type, given an attribute code and entity type.") @cache(cacheIdentity: "Magento\\EavGraphQl\\Model\\Resolver\\Cache\\CustomAttributeMetadataIdentity")
6-
attributesMetadata(attributes: [AttributeInput!]): AttributesMetadataOutput! @resolver(class: "Magento\\EavGraphQl\\Model\\Resolver\\AttributesMetadata") @doc(description: "Retrieve EAV attributes metadata.")
5+
customAttributeMetadata(attributes: [AttributeInput!]! @doc(description: "An input object that specifies the attribute code and entity type to search.")):
6+
CustomAttributeMetadata
7+
@resolver(class: "Magento\\EavGraphQl\\Model\\Resolver\\CustomAttributeMetadata")
8+
@doc(description: "Return the attribute type, given an attribute code and entity type.")
9+
@cache(cacheIdentity: "Magento\\EavGraphQl\\Model\\Resolver\\Cache\\CustomAttributeMetadataIdentity")
10+
@deprecated(reason: "Use `customAttributeMetadataV2` query instead.")
11+
customAttributeMetadataV2(attributes: [AttributeInput!]): AttributesMetadataOutput! @resolver(class: "Magento\\EavGraphQl\\Model\\Resolver\\AttributesMetadata") @doc(description: "Retrieve EAV attributes metadata.")
712
attributesForm(type: String! @doc(description: "Form type")): AttributesFormOutput! @resolver(class: "Magento\\EavGraphQl\\Model\\Resolver\\AttributesForm") @doc(description: "Retrieve EAV attributes associated to a frontend form.")
813
attributesList(entityType: AttributeEntityTypeEnum! @doc(description: "Entity type.")): AttributesMetadataOutput @resolver(class: "Magento\\EavGraphQl\\Model\\Resolver\\AttributesList") @doc(description: "Returns list of atributes metadata for given entity type.") @cache(cacheable: false)
914
}
@@ -46,7 +51,7 @@ input AttributeInput @doc(description: "Defines the attribute characteristics to
4651
}
4752

4853
type AttributesMetadataOutput @doc(description: "Metadata of EAV attributes.") {
49-
items: [AttributeMetadataInterface!]! @doc(description: "Requested attributes metadata.")
54+
items: [CustomAttributeMetadataInterface!]! @doc(description: "Requested attributes metadata.")
5055
errors: [AttributeMetadataError!]! @doc(description: "Errors of retrieving certain attributes metadata.")
5156
}
5257

@@ -61,7 +66,7 @@ enum AttributeMetadataErrorType @doc(description: "Attribute metadata retrieval
6166
UNDEFINED @doc(description: "Not categorized error, see the error message.")
6267
}
6368

64-
interface AttributeMetadataInterface @typeResolver(class: "Magento\\EavGraphQl\\Model\\TypeResolver\\AttributeMetadata") @doc(description: "An interface containing fields that define the EAV attribute."){
69+
interface CustomAttributeMetadataInterface @typeResolver(class: "Magento\\EavGraphQl\\Model\\TypeResolver\\AttributeMetadata") @doc(description: "An interface containing fields that define the EAV attribute."){
6570
uid: ID! @doc(description: "The unique ID of an attribute. Based on entity type and attribute code")
6671
code: String! @doc(description: "The unique identifier for an attribute code. This value should be in lowercase letters without spaces.")
6772
label: String @doc(description: "The label assigned to the attribute.")
@@ -70,20 +75,20 @@ interface AttributeMetadataInterface @typeResolver(class: "Magento\\EavGraphQl\\
7075
is_required: Boolean! @doc(description: "Whether the attribute value is required.")
7176
default_value: String @doc(description: "Default attribute value.")
7277
is_unique: Boolean! @doc(description: "Whether the attribute value must be unique.")
73-
options: [AttributeOptionInterface!]! @doc(description: "Attribute options.")
78+
options: [CustomAttributeOptionInterface!]! @doc(description: "Attribute options.")
7479
}
7580

76-
interface AttributeOptionInterface @typeResolver(class: "Magento\\EavGraphQl\\Model\\TypeResolver\\AttributeOption") {
81+
interface CustomAttributeOptionInterface @typeResolver(class: "Magento\\EavGraphQl\\Model\\TypeResolver\\AttributeOption") {
7782
uid: ID! @doc(description: "The unique ID of an attribute option.")
7883
label: String! @doc(description: "The label assigned to the attribute option.")
7984
value: String! @doc(description: "The attribute option value.")
8085
is_default: Boolean @doc(description: "Is the option value default.")
8186
}
8287

83-
type AttributeOptionMetadata implements AttributeOptionInterface @doc(description: "Base EAV implementation of AttributeOptionInterface.") {
88+
type AttributeOptionMetadata implements CustomAttributeOptionInterface @doc(description: "Base EAV implementation of CustomAttributeOptionInterface.") {
8489
}
8590

86-
type AttributeMetadata implements AttributeMetadataInterface @doc(description: "Base EAV implementation of AttributeMetadataInterface.") {
91+
type AttributeMetadata implements CustomAttributeMetadataInterface @doc(description: "Base EAV implementation of CustomAttributeMetadataInterface.") {
8792
}
8893

8994
enum AttributeEntityTypeEnum @doc(description: "List of all entity types. Populated by the modules introducing EAV entities.") {
@@ -109,7 +114,7 @@ enum AttributeFrontendInputEnum @doc(description: "EAV attribute frontend input
109114
}
110115

111116
type AttributesFormOutput @doc(description: "Metadata of EAV attributes associated to form") {
112-
items: [AttributeMetadataInterface!]! @doc(description: "Requested attributes metadata.")
117+
items: [CustomAttributeMetadataInterface!]! @doc(description: "Requested attributes metadata.")
113118
errors: [AttributeMetadataError!]! @doc(description: "Errors of retrieving certain attributes metadata.")
114119
}
115120

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/Attribute/BooleanTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class BooleanTest extends GraphQlAbstract
2323
{
2424
private const QUERY = <<<QRY
2525
{
26-
attributesMetadata(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
26+
customAttributeMetadataV2(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
2727
items {
2828
uid
2929
code
@@ -72,7 +72,7 @@ public function testMetadata(): void
7272

7373
$this->assertEquals(
7474
[
75-
'attributesMetadata' => [
75+
'customAttributeMetadataV2' => [
7676
'items' => [
7777
[
7878
'uid' => $uid,

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/Attribute/CustomerAddressAttributesTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class CustomerAddressAttributesTest extends GraphQlAbstract
2323
{
2424
private const QUERY = <<<QRY
2525
{
26-
attributesMetadata(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
26+
customAttributeMetadataV2(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
2727
items {
2828
uid
2929
code
@@ -83,7 +83,7 @@ public function testMetadata(): void
8383

8484
$this->assertEquals(
8585
[
86-
'attributesMetadata' => [
86+
'customAttributeMetadataV2' => [
8787
'items' => [
8888
[
8989
'uid' => $uid,

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/Attribute/DateTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class DateTest extends GraphQlAbstract
2323
{
2424
private const QUERY = <<<QRY
2525
{
26-
attributesMetadata(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
26+
customAttributeMetadataV2(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
2727
items {
2828
uid
2929
code
@@ -81,7 +81,7 @@ public function testMetadata(): void
8181

8282
$this->assertEquals(
8383
[
84-
'attributesMetadata' => [
84+
'customAttributeMetadataV2' => [
8585
'items' => [
8686
[
8787
'uid' => $uid,

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/Attribute/FileTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class FileTest extends GraphQlAbstract
2323
{
2424
private const QUERY = <<<QRY
2525
{
26-
attributesMetadata(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
26+
customAttributeMetadataV2(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
2727
items {
2828
uid
2929
code
@@ -77,7 +77,7 @@ public function testMetadata(): void
7777

7878
$this->assertEquals(
7979
[
80-
'attributesMetadata' => [
80+
'customAttributeMetadataV2' => [
8181
'items' => [
8282
[
8383
'uid' => $uid,

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/Attribute/ImageTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ImageTest extends GraphQlAbstract
2323
{
2424
private const QUERY = <<<QRY
2525
{
26-
attributesMetadata(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
26+
customAttributeMetadataV2(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
2727
items {
2828
uid
2929
code
@@ -77,7 +77,7 @@ public function testMetadata(): void
7777

7878
$this->assertEquals(
7979
[
80-
'attributesMetadata' => [
80+
'customAttributeMetadataV2' => [
8181
'items' => [
8282
[
8383
'uid' => $uid,

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/Attribute/MultilineTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class MultilineTest extends GraphQlAbstract
2323
{
2424
private const QUERY = <<<QRY
2525
{
26-
attributesMetadata(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
26+
customAttributeMetadataV2(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
2727
items {
2828
uid
2929
code
@@ -85,7 +85,7 @@ public function testMetadata(): void
8585

8686
$this->assertEquals(
8787
[
88-
'attributesMetadata' => [
88+
'customAttributeMetadataV2' => [
8989
'items' => [
9090
[
9191
'uid' => $uid,

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/Attribute/MultiselectTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MultiselectTest extends GraphQlAbstract
2626
{
2727
private const QUERY = <<<QRY
2828
{
29-
attributesMetadata(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
29+
customAttributeMetadataV2(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
3030
items {
3131
uid
3232
default_value
@@ -105,7 +105,7 @@ public function testMetadata(): void
105105

106106
$this->assertEquals(
107107
[
108-
'attributesMetadata' => [
108+
'customAttributeMetadataV2' => [
109109
'items' => [
110110
[
111111
'uid' => $uid,

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/Attribute/SelectTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class SelectTest extends GraphQlAbstract
2727
{
2828
private const QUERY = <<<QRY
2929
{
30-
attributesMetadata(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
30+
customAttributeMetadataV2(attributes: [{attribute_code: "%s", entity_type: "%s"}]) {
3131
items {
3232
uid
3333
options {
@@ -90,7 +90,7 @@ public function testMetadata(): void
9090

9191
$this->assertEquals(
9292
[
93-
'attributesMetadata' => [
93+
'customAttributeMetadataV2' => [
9494
'items' => [
9595
[
9696
'uid' => $uid,

0 commit comments

Comments
 (0)