Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphql products query returns only ids for select or multiselect fields #31622

Open
wants to merge 5 commits into
base: 2.4-develop
Choose a base branch
from

Conversation

shikhamis11
Copy link
Member

Description (*)

Query productDetail($url_key: String) {
  productDetail: products(filter: {url_key: {eq: $url_key}}) {
    items {
      name
      url_key
      gender
    }
  }
}

variables:

{
"url_key": "dual-handle-cardio-ball"
}

Actual result (*)

the response only returns the value ids.

{
  "data": {
    "productDetail": {
      "items": [
        {
          "name": "Dual Handle Cardio Ball",
          "url_key": "dual-handle-cardio-ball",
          "gender": "5507,5508,5511"
        }
      ]
    }
  }
}

for showing additional custom attributes we have added custom_attributes field
for Example

{
  products(filter: { sku: { eq: "simple001" } }) {
    items {
      name
      url_key
      custom_attributes {
        code
        value
      }    
    }
  }
}

output will be like

{
  "data": {
    "products": {
      "items": [
        {
          "name": "simple001",
          "url_key": "simple001",
          "custom_attributes": [
            {
              "code": "color",
              "value": null
            },
            {
              "code": "manufacturer",
              "value": null
            },
            {
              "code": "test_attribute",
              "value": "t1, t2, t3"
            }
          ]
        }
      ]
    }
  }
}

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes Graphql products query returns only ids for dropdows or multiselect fields #28200

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Jan 12, 2021

Hi @shikhamis11. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@shikhamis11
Copy link
Member Author

@magento run all tests

@shikhamis11 shikhamis11 added the PAP Partners acceleration program label Jan 12, 2021
@shikhamis11
Copy link
Member Author

@magento run Unit Tests

@shikhamis11
Copy link
Member Author

@magento run all tests

@harrywutech
Copy link

harrywutech commented Feb 5, 2021

@shikhamis11 Hi there, we are experiencing the same issue for our store, so do you guys know what is the fix? Thanks

@theshreyas
Copy link

Hi there, we are experiencing the same issue for our store, so do you guys know what is the fix? Thanks

Try this quickfix module

@gabrieldagama gabrieldagama added the Priority: P3 May be fixed according to the position in the backlog. label Mar 18, 2021
@gabrieldagama
Copy link
Contributor

Prioritized as P3 due to possible changes on approach, more information here: magento/architecture#456

@cpartica
Copy link
Contributor

cpartica commented Nov 5, 2021

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@shikhamis11
Copy link
Member Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@cpartica cpartica added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. and removed Priority: P3 May be fixed according to the position in the backlog. labels Nov 22, 2021
@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Charlie
Copy link
Contributor

As mentioned in above comment, we are doing follow up with team. We are waiting for the PO's input on the same. Once will get the clarity on that, we will proceed further on this.

Thank you!

@engcom-Charlie
Copy link
Contributor

As per latest updates on JIRA, internal GraphQL team will going to work on this issue in separate epic, which they will try to deliver in scope of 2.4.7. until then keeping the PR in same status.

Thank you!

@engcom-Charlie
Copy link
Contributor

engcom-Charlie commented Jan 10, 2023

As per above comment moving this PR On hold until it gets deliver in 2.4.7

Thank you!

@maaarghk
Copy link

@gabrieldagama @cpartica now the next release is 2.4.7, this can be unheld?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: CatalogGraphQl PAP Partners acceleration program Partner: Cedcommerce partners-contribution Pull Request is created by Magento Partner Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: on hold Release Line: 2.4
Projects
Development

Successfully merging this pull request may close these issues.

Graphql products query returns only ids for dropdows or multiselect fields