Skip to content

Conversation

@bc-Vince
Copy link
Contributor

@bc-Vince bc-Vince commented Oct 31, 2025

Created a net new overview doc for the B2B Edition GraphQL Storefront API.

DEVDOCS-6506

What changed?

  • The Dev Center now includes an article with introductory information for using the B2B Edition GraphQL Storefront API.

Release notes draft

Created a net new overview doc for the B2B Edition GraphQL Storefront API.
@bc-Vince bc-Vince requested a review from bc-terra October 31, 2025 15:56
@bc-Vince bc-Vince added the ready for review This PR is complete and awaiting a review. label Oct 31, 2025
@bc-Vince
Copy link
Contributor Author

I will create a companion PR in developer-center after we have confirmed the final folder/nav structure for this new article.


## Pagination

All queries that return a list of items follow the [Cursor Connections](https://facebook.github.io/relay/graphql/connections.htm) pattern, allowing you to paginate results and communicate whether additional results are available. To learn more about utilizing pagination, see the [BigCommerce GraphQL Storefront API overview](/docs/storefront/graphql#pagination).
Copy link

Choose a reason for hiding this comment

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

⚠️ [remark-lint] reported by reviewdog 🐶
Hard to read sentence (confidence: 5/7) retext-readability retext-readability

"channelId":"1"
}
```

Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing and

Suggested change
</Tab>
</Tabs>

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not seeing what's missing but yeah ... suggested fix.

.catch((err) => console.error(err));
</script>
```

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above

Suggested change
</Tab>
</Tabs>

</Tab>
<Tab>

```jhtml filename="Authenticated query using getB2BToken" showLineNumbers copy
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
```jhtml filename="Authenticated query using getB2BToken" showLineNumbers copy
```html filename="Authenticated query using getB2BToken" showLineNumbers copy

Copy link
Collaborator

Choose a reason for hiding this comment

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

picking nits, but this will fix the syntax highlighting


You can return extra field information in queries as well as specify field values in mutations that create or update new records. See the query below for how you can include extra fields in your requests.

```
Copy link
Collaborator

Choose a reason for hiding this comment

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

For syntax highlighting

Suggested change
```
```graphql copy

@@ -0,0 +1,218 @@
# B2B Edition GraphQL Storefront API overview

The B2B Edition GraphQL Storefront API provides a dynamic method for querying and modifying B2B Edition data from your storefront applications. The GraphQL Storefront API powers the Buyer Portal, and allows you to customize your buyers’ B2B experience on hosted and headless storefronts.
Copy link
Contributor

Choose a reason for hiding this comment

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

"powers the Buyer Portal and allows" (no comma)


Using the B2B Edition GraphQL Storefront API, you can:

* Create a registration form for new Company accounts.
Copy link
Contributor

Choose a reason for hiding this comment

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

"Register new Company accounts" (not quite accurate to say the GraphQL "creates a registration form")


## Authentication

The B2B Edition GraphQL Storefront API uses storefront authTokens to authenticate requests. You must add your token to the request header in the following format: `"Authorization": "Bearer [token value]"`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's really important right off the bat to emphasize anonymous vs. authorized requests, especially as this pattern is so different from what devs are used to with the BC GraphQL Storefront API.

Here are what I consider key points that would be worth including in the beginning of the discussion on authentication:

  • Queries/mutations are either anonymous (like the login mutation itself) or authenticated.
  • Anonymous queries/mutations don't require any kind of authentication token/header at all.
  • Authenticated queries/mutations require the Authorization bearer token as described.

This is as opposed to the BC GraphQL Storefront API, which ALWAYS requires a bearer token, and where the user-specific Customer Access Token is totally separate.

Not suggesting that we necessarily must directly discuss the contrast, but I think it would be good to explicitly refer to anonymous vs authenticated, in a way that's 100% clear to be people used to the other pattern.


## FAQ

**Does the B2B Edition GraphQL Storefront API support webhooks?**
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels out of place to me. I'm not sure how a GraphQL API would "support webhooks."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review This PR is complete and awaiting a review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants