schema.graphqls 1.3 KB

12345678910111213141516171819202122232425
  1. # Copyright © Magento, Inc. All rights reserved.
  2. # See COPYING.txt for license details.
  3. type EntityUrl @doc(description: "EntityUrl is an output object containing the `id`, `canonical_url`, and `type` attributes") {
  4. id: Int @doc(description: "The ID assigned to the object associated with the specified url. This could be a product ID, category ID, or page ID.")
  5. canonical_url: String @doc(description: "The internal relative URL. If the specified url is a redirect, the query returns the redirected URL, not the original.")
  6. type: UrlRewriteEntityTypeEnum @doc(description: "One of PRODUCT, CATEGORY, or CMS_PAGE.")
  7. }
  8. type Query {
  9. urlResolver(url: String!): EntityUrl @resolver(class: "Magento\\UrlRewriteGraphQl\\Model\\Resolver\\EntityUrl") @doc(description: "The urlResolver query returns the relative URL for a specified product, category or CMS page")
  10. }
  11. enum UrlRewriteEntityTypeEnum {
  12. }
  13. type UrlRewrite @doc(description: "The object contains URL rewrite details") {
  14. url: String @doc(description: "Request URL")
  15. parameters: [HttpQueryParameter] @doc(description: "Request parameters")
  16. }
  17. type HttpQueryParameter @doc(description: "The object details of target path parameters") {
  18. name: String @doc(description: "Parameter name")
  19. value: String @doc(description: "Parameter value")
  20. }