Url Redirect
Requires access scope.
The URL redirect for the online store.
Anchor to FieldsFields
- id (ID!)
- path (String!)
- target (String!)
- •ID!non-null
The ID of the URL redirect.
- Anchor to pathpath•String!non-null
The old path to be redirected from. When the user visits this path, they will be redirected to the target location.
- Anchor to targettarget•String!non-null
The target location where the user will be redirected to.
Anchor to QueriesQueries
- urlRedirect (UrlRedirect)
- urlRedirects (UrlRedirectConnection!)
- •query
Returns a
resource by ID.- •ID!required
The ID of the
to return.
Arguments
- •ID!
- •query
A list of redirects for a shop.
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators.
name type description acceptable_values default_value example_use default string Filter by a case-insensitive search of multiple fields in a document. - query=Bob Norman
-query=title:green hoodiecreated_at time id id Filter by idrange.- id:1234
-id:>=1234
-id:<=1234path string target string You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). - Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to savedSearchIdsaved•ID
Search Id The ID of a saved search. The search’s query string is used as the query argument.
- Anchor to sortKeysort•Url
Key Redirect Sort Keys Default:ID Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.
Arguments
Anchor to MutationsMutations
- urlRedirectCreate (UrlRedirectCreatePayload)
- urlRedirectUpdate (UrlRedirectUpdatePayload)
- •mutation
- Anchor to urlRedirecturl•Url
Redirect Redirect Input! required The fields to use when creating the redirect.
Arguments
- •mutation
Updates a URL redirect.
- •ID!required
The ID of the URL redirect to update.
- Anchor to urlRedirecturl•Url
Redirect Redirect Input! required The input fields required to update the URL redirect.
Arguments
- •ID!