fix(symfony): api_platform_iris route loader for graphql-only setups#7934
Merged
soyuka merged 1 commit intoapi-platform:4.3from Apr 29, 2026
Merged
fix(symfony): api_platform_iris route loader for graphql-only setups#7934soyuka merged 1 commit intoapi-platform:4.3from
soyuka merged 1 commit intoapi-platform:4.3from
Conversation
c3d0b27 to
66e8b01
Compare
| Q | A | ------------- | --- | Branch? | 4.3 | Tickets | api-platform#7915 | License | MIT | Doc PR | ∅ Adds a new `api_platform_iris` Symfony route loader type that registers only the auto-generated `NotExposed` operations, allowing graphql-only APIs to keep IRIs working without exposing REST endpoints. Replaces the earlier IriConverter decorator approach.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new
api_platform_irisSymfony route loader type that registers only the auto-generatedNotExposedoperations — no exposed REST controllers, no docs/entrypoint routes. This lets users run a GraphQL-only API while keeping IRIs (Relay global IDs, subscription keys, nested IRI inputs) working through the standardapi_platform.symfony.iri_converter.Usage
REST setups keep
type: api_platformexactly as before.Why this approach
The
NotExposedOperationResourceMetadataCollectionFactoryalready auto-generates aNotExposedoperation for any resource without an item GET (for example resources declared withoperations: []andgraphqlOperations: [...]). The new loader simply walks the same metadata and emits Symfony routes for thoseNotExposedoperations only. This means IRI generation and matching go through the regularapi_platform.symfony.iri_converter— no decorator, no shadow URI-template engine.