Added prebuild event for extending possibilities to hook into graphql queries#982
Added prebuild event for extending possibilities to hook into graphql queries#982valantic-cx-alps wants to merge 3 commits intopimcore:2.xfrom
Conversation
|
There was a problem hiding this comment.
Pull request overview
Adds a new GraphQL listing “pre-build” event hook intended to allow extensions to intervene before a listing is constructed and loaded.
Changes:
- Dispatches a new
ListingEvents::PRE_BUILDevent at the start ofQueryType::resolveListing(). - Introduces
ListingEvents::PRE_BUILDevent constant for subscribers.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/GraphQL/Resolver/QueryType.php | Dispatches the new pre-build event before creating and configuring the object listing. |
| src/Event/GraphQL/ListingEvents.php | Defines the new PRE_BUILD event name/annotation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| $event = new GenericEvent( | ||
| arguments: $args, | ||
| ); |
There was a problem hiding this comment.
GenericEvent is referenced without an import or a fully-qualified class name, which will cause a runtime error (Class "...\GenericEvent" not found). Add use Symfony\Component\EventDispatcher\GenericEvent; at the top of the file (or reference it via the full namespace).
There was a problem hiding this comment.
@valantic-cx-alps Could you please add use Symfony\Component\EventDispatcher\GenericEvent;? Thanks
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|



No description provided.