From 783c601b0ad306894cf538354b34e33b31b20f95 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Mon, 12 Feb 2024 04:01:34 -0800 Subject: [PATCH] Don't show empty headings on the GQL schema edit page [ci skip] --- CHANGELOG.md | 1 + src/templates/graphql/schemas/_edit.twig | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 213729b025d..a97dc84d8fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased - Fixed a bug where read/write splitting was always getting disabled for GraphQL POST requests. ([#14324](https://github.com/craftcms/cms/issues/14324)) +- Fixed a bug where GraphQL schema edit pages could include empty category headings. ## 4.7.2.1 - 2024-02-08 diff --git a/src/templates/graphql/schemas/_edit.twig b/src/templates/graphql/schemas/_edit.twig index 46a64675d1e..64c6bdd3570 100644 --- a/src/templates/graphql/schemas/_edit.twig +++ b/src/templates/graphql/schemas/_edit.twig @@ -85,7 +85,7 @@ {% set schemaComponents = craft.app.gql.getAllSchemaComponents %} - {% for category, catPermissions in schemaComponents.queries %} + {% for category, catPermissions in schemaComponents.queries|filter %}

{{ category }}

@@ -97,7 +97,7 @@

{{ 'Choose the available mutations for this schema:'|t('app') }}

- {% for category, catPermissions in schemaComponents.mutations %} + {% for category, catPermissions in schemaComponents.mutations|filter %}

{{ category }}