Skip to content

Adding separate query for products by id in GraphQL different from search #28578

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

Closed
magento-engcom-team opened this issue Jun 5, 2020 · 11 comments · May be fixed by #28316
Closed

Adding separate query for products by id in GraphQL different from search #28578

magento-engcom-team opened this issue Jun 5, 2020 · 11 comments · May be fixed by #28316
Assignees
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: needs update Additional information is require, waiting for response Priority: P3 May be fixed according to the position in the backlog. Progress: done Project: GraphQL Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Milestone

Comments

@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Jun 5, 2020

In order to load a Template, one must make a query to the urlResolver to obtain the id, uid and type of the content.

i.e.

urlResolver(url: "/breathe-easy-tank") {
  id
  uid
  type
}
{code}


{code}
{
  "data": {
    "urlResolver": {
      "id": 1
      "uid": "fhdjksfhdsf8dsf89sdf"
      "type": "PRODUCT"
    }
  }
}
{code}

Then using that information, one could load a template using the type. In this case, PRODUCT where and run a second GraphQL Query requesting the product id. However, ***id*** doesn't seem to be in the filter criteria. 

{code}
  productsByID(uids: < "uid1", "uid2"], id: [1,2,3> ) {
    items {
      id
      name
    }
  }

Note: This is the flow for loading the other two types: CMS_PAGE and CATEGORY.

AC:
New query must be added this scenario is not going to use Search API.
Query must support tagging a caching
Multiple IDs can be passed to the filter to obey some scenarios in which we need to display multiple products like: product compare, or multiple specific products, etc

Check the attached PR as a solution and add additional changes

@magento-engcom-team magento-engcom-team added Progress: ready for dev Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch labels Jun 5, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jun 5, 2020

Hi @magento-engcom-team. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

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

Please, add a comment to assign the issue: @magento I am working on this


@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Jun 5, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jun 5, 2020

Hi @paliarush. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

    1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
      DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
    1. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
    1. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

@m2-assistant
Copy link

m2-assistant bot commented Jun 11, 2020

Hi @serhiyzhovnir. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

    1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
      DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
    1. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
    1. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

@m2-assistant
Copy link

m2-assistant bot commented Jun 11, 2020

Hi @rogyar. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@nrkapoor
Copy link

@serhiyzhovnir @rogyar @paliarush This is another issue for this PR #28316

@mauragcyrus mauragcyrus added the PAP Partners acceleration program label Oct 13, 2020
@mauragcyrus mauragcyrus changed the title Can't filter products by id in GraphQL [NOT READY] Can't filter products by id in GraphQL Nov 5, 2020
@nrkapoor nrkapoor modified the milestones: 2.4.2, 2.4.3 Dec 20, 2020
@mauragcyrus mauragcyrus removed the PAP Partners acceleration program label Jan 20, 2021
@mauragcyrus
Copy link

@magento export issue to Jira project MCLOUD as Story

@github-jira-sync-bot
Copy link

✅ Jira issue (https://jira.corp.magento.com/browse/MCLOUD-7743) is successfully created for this issue.

@github-jira-sync-bot github-jira-sync-bot changed the title [NOT READY] Can't filter products by id in GraphQL Can't filter products by id in GraphQL Mar 4, 2021
@github-jira-sync-bot github-jira-sync-bot changed the title Can't filter products by id in GraphQL Adding separate query for products by id in GraphQL different from search Mar 4, 2021
@cpartica
Copy link
Contributor

cpartica commented Sep 7, 2021

instead of adding a specific query for product by Id we want to do this: magento/architecture#477

@engcom-Hotel
Copy link
Contributor

@magento-engcom-team & @cpartica As we have PR to address this issue, can we close this issue.

@engcom-Hotel engcom-Hotel added the Issue: needs update Additional information is require, waiting for response label Nov 19, 2021
@engcom-Hotel engcom-Hotel self-assigned this Nov 19, 2021
@m2-assistant
Copy link

m2-assistant bot commented Nov 19, 2021

Hi @engcom-Hotel. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Hotel
Copy link
Contributor

Dear @magento-engcom-team & @cpartica,

We have noticed that this issue has not been updated for a period of 14 Days. Hence we assume that this issue is fixed now, so we are closing it. Please raise a fresh ticket or reopen this ticket if you need more assistance on this.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: needs update Additional information is require, waiting for response Priority: P3 May be fixed according to the position in the backlog. Progress: done Project: GraphQL Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants