Skip to content

Add missing DocumentElementType Renderlet#1005

Open
blankse wants to merge 4 commits into
pimcore:2026.1from
blankse:renderlet
Open

Add missing DocumentElementType Renderlet#1005
blankse wants to merge 4 commits into
pimcore:2026.1from
blankse:renderlet

Conversation

@blankse

@blankse blankse commented Nov 18, 2025

Copy link
Copy Markdown
Contributor

Adds GraphQL support for the Renderlet document editable, which was previously missing from the document element types.

Introduces a new RenderletType exposing the editable's _editableType, _editableName, id, type, subtype and the referenced relation (resolved as an anytarget element), plus the corresponding Renderlet query field config generator and its service registration.

@blankse blankse marked this pull request as draft November 18, 2025 13:27
@blankse blankse changed the title Add missing DocumentElementrType Renderlet Add missing DocumentElementType Renderlet Nov 18, 2025
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
21 New Major Issues (required ≤ 0)
3 New Bugs (required ≤ 0)
1 New Critical Issues (required ≤ 0)
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@blankse blankse marked this pull request as ready for review November 18, 2025 13:54
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
21 New Major Issues (required ≤ 0)
1 New Critical Issues (required ≤ 0)
B Reliability Rating on New Code (required ≥ A)
3 New Bugs (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Adds a RenderletType GraphQL type and its query field config generator,
modeled on the existing RelationsType, exposing the editable's
_editableType/_editableName/id/type/subtype and its single relation
target. Registers the generator service and baselines the new static()
usage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@blankse blankse changed the base branch from 1.9 to 2026.1 June 9, 2026 12:58
blankse and others added 3 commits June 9, 2026 12:59
Extract a resolveRenderlet() helper for the simple editable fields so the
repeated instanceof checks no longer live inside getInstance(), reducing its
cognitive complexity below the threshold. Drop the unused resolver parameters
from those fields and wrap the relation resolver signature to stay within the
line-length limit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@blankse

blankse commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

@kingjia90 Can you review this also please?

Copilot AI left a comment

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.

Pull request overview

This PR adds GraphQL query support for the Pimcore "Renderlet" document editable, which was previously the only document element type missing a GraphQL type. It introduces a new RenderletType (exposing _editableType, _editableName, id, type, subtype, and the referenced relation resolved as an anytarget element), a matching Renderlet field-config generator, and wires them up via service configuration. The remainder of the diff is a regenerated studio frontend build (new hash directory 64084715… replacing 785fd5b2…).

Changes:

  • New RenderletType GraphQL object type, mirroring the existing RelationType (uses getO() for the relation target instead of getElement()).
  • New Renderlet query field config generator + service registration in graphql.yml, and a phpstan-baseline entry for the new static() usage.
  • Regenerated studio build artifacts and a refreshed manifest/publicPath hash.

Reviewed changes

Copilot reviewed 12 out of 27 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/GraphQL/DocumentElementType/RenderletType.php New GraphQL type exposing Renderlet fields and relation
src/GraphQL/DocumentElementQueryFieldConfigGenerator/Renderlet.php New generator returning RenderletType, consistent with siblings
src/Resources/config/graphql.yml Registers the Renderlet type generator service
phpstan-baseline.neon Baselines the new static() warning for RenderletType
src/Resources/public/studio/build/64084715.../* Regenerated studio frontend build artifacts (new hash dir)
src/Resources/public/studio/build/785fd5b2.../* Removed previous studio build artifacts

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants