Skip to content

fix(resources): render configured documentation sections - #2532

Open
6iu8a wants to merge 1 commit into
graphql:sourcefrom
6iu8a:fix/resource-docs-sections
Open

6iu8a wants to merge 1 commit into
graphql:sourcefrom
6iu8a:fix/resource-docs-sections

Conversation

@6iu8a

@6iu8a 6iu8a commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Exclude docs sections from the empty resource-group check, since their content comes from category configuration.

Closes #2533

Description

Documentation sections were skipped when a category had no resources
grouped under docs, even though their content is defined independently
in categoriesConfig.

Exclude docs from the empty resource-group check, alongside event.
This restores the configured documentation sections and their navigation
targets on the frontend, backend, federation, security, and monitoring pages.

Exclude docs sections from the empty resource-group check,
since their content comes from category configuration.
@vercel

vercel Bot commented Oct 7, 2026

Copy link
Copy Markdown

@6iu8a is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel.

A member of the Team first needs to authorize it.

// "event" section uses working group meetings, not resources
if (key !== "event" && !data?.length) {
// event and docs use independent data sources, not grouped resources
if (key !== "event" && key !== "docs" && !data?.length) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks like it might be a band-aid -- @6iu8a I'm not too familiar with this section of the site, do you have any idea what the underlying problem might be? Should we be altering the sections list instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for taking a look! The underlying issue is that docs gets its content from a different source than the one this guard checks. sections already includes docs from categoriesConfig, and DocsSection resolves the configured doc paths through learnPages. Those pages aren't loaded into grouped, so the empty-resource check skips the section even though it has content.

I kept this change small to fix that mismatch, following the existing exception for event. Your suggestion about sections makes sense, though: we could determine which sections to display based on their respective data sources, then use that same list for both the TOC and rendering. Currently, the TOC uses the unfiltered list while the rendering loop can skip sections.

Would you prefer that I update this PR in that direction?

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation sections are missing from Resource Hub category pages

2 participants