Closed magento-engcom-team closed 3 years ago
The issue was exported from the internal JIRA. The link to the original JIRA issue: https://jira.corp.magento.com/browse/MC-39746
Hi @magento-engcom-team. Thank you for your report. To help us process this issue please make sure that you provided the following information:
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
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues 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.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
@magento I am working on this
More info here. https://github.com/magento/architecture/blob/898049e0834d7a07e4a9ee500937c011a111aa99/design-documents/graph-ql/coverage/storefront-route.md
Acceptance Criteria:
Add a
RoutableInterface
to the base schema, and require all entity types which are routable to implement it.A subset of Magento entities is "routable", in that they have URLs and they serve as the model for a rendered page. The natural fit for this concept is an interface, and GraphQL provides multiple interfaces (http://spec.graphql.org/June2018/#sec-Objects) so that a given type can implement more than one.
As described in Requirements (https://github.com/magento/architecture/blob/898049e0834d7a07e4a9ee500937c011a111aa99/design-documents/graph-ql/coverage/storefront-route.md#requirements), the PWA must have the entity type and entity data for a given route, and it should be able to query for display metadata for that route. A GraphQL interface is a good match for these requirements:
Get the entity type using
__typename
introspection to get the GraphQL concrete type of theRoutableInterface
Get the entity data from the same
RoutableInterface
using GraphQL fragments on concrete type conditionsGet optional display metadata by requiring that field in the
RoutableInterface
Notes:
An uncached response from the
urlResolver
query, in Magento cloud, takes around ~200ms to complete.This change would provide the following benefits: