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

DEVDOCS-5007: [new] GQL Storefront, Extended GQL LookupURL Route Redirects #2111

Conversation

bc-tgomez
Copy link
Collaborator

@bc-tgomez bc-tgomez commented Dec 4, 2023

DEVDOCS-5007

What changed?

  • Document GQL redirects queries, including optional arguments
  • Add example queries for each redirect type

Anything else?

ping {names}

@bc-tgomez bc-tgomez self-assigned this Dec 4, 2023
@bc-tgomez bc-tgomez marked this pull request as draft December 4, 2023 22:12
**GraphQL Storefront API**
# Guide to Working with Redirects

BigCommerce's GraphQL Storefront API lets frontend developers modify [Redirects](/docs/rest-content/store-content/redirects##upsert-redirects) from a store. These built-in capabilities also allow developers to customize their hosted or headless storefronts with Redirects.
Copy link

@bc-jz bc-jz Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GraphQL Storefront API does not allow modification of redirects, just the standard (REST) API....v2 and v3.

Copy link

@bc-jz bc-jz Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or headless
I don't think redirect behavior really relates to headless stores unless I am misunderstanding your point.

The [Create a Redirect](/docs/rest-content/store-content/redirects#create-a-redirect) API endpoint is deprecated. Use the [Upsert Redirects](/docs/rest-management/redirects) API endpoint instead to update new redirect data.
</Callout>

The GraphQL Storefront API lets you set the following redirect attributes and more:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you set
You are not really "setting" anything with the GQL API. You are able to discover if a redirect exists for a certain URL path and follow it to retrieve the destination content if you want.

@slsriehl
Copy link
Contributor

See successor branch at https://github.com/bigcommerce/docs/tree/DEVDOCS-5007.

@slsriehl slsriehl closed this Dec 28, 2023
@slsriehl slsriehl changed the title [DEVDOCS-5007]: [new] GQL Storefront, Extended GQL LookupURL Route Redirects DEVDOCS-5007: [new] GQL Storefront, Extended GQL LookupURL Route Redirects Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants