graphql-docs icon indicating copy to clipboard operation
graphql-docs copied to clipboard

Empty sections should not be included in the generated documentation

Open Fs00 opened this issue 1 year ago • 1 comments

Describe the bug My GraphQL schema doesn't have any union type. Nevertheless, I see that the Unions section is present in the generated docs (but it's empty) and the Union landing page is generated. This also happens when there are no schema items for other categories of types like enums, mutations or interfaces.

To Reproduce Generate the docs for a schema without items of a certain category (mutations, enums, etc.).

Expected behavior The sidebar section for the category that has no items should not be present and the corresponding landing page should not be generated.

Screenshots Empty section in the sidebar: Sidebar

Fs00 avatar Mar 13 '23 14:03 Fs00

@Fs00 thanks for logging this. Makes sense! I'll try to get this fixed up for upcoming the v4.1 release this week.

brettchalupa avatar Mar 13 '23 14:03 brettchalupa