- Issue created by @ricovandevin
- Assigned to ricovandevin
- Status changed to Needs review
about 1 year ago 12:54pm 25 August 2023 - 🇳🇱Netherlands ricovandevin
Updated the PR as we need to check to migration ID in the event subscriber to see if we should actually act on the migration that is running when the event is dispatched.
- 🇮🇹Italy reinchek Napoli 🌋, 🇮🇹
Hi @ricovandevin,
thanks again for your constant activity on the module!I would like to embed also this feature but i think that we need to work on a exphansive documentation. I've already created a doc page:
https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... →
But need to be completed of all module's features.I will take some more time to review it and possibly integrate it into the branch, accompanying the change, however, with documentation.
Thanks,
let me know what do you thinks about. - Status changed to Needs work
5 months ago 6:08pm 4 July 2024 - 🇳🇱Netherlands ricovandevin
Resolved merge conflicts in MR.
Needs work for the documentation part.
- 🇮🇹Italy reinchek Napoli 🌋, 🇮🇹
Hi @ricovandevin, thanks for your contribution!
Recently i worked on the new documentation, including all about *-dev merged features (read more: https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... → ).
I will merge your MR in 2.x-dev and i think that the module is ready for a new stable release 2.0.8 but not before adding the instructions about the
ResultsEvent
(let me know if you want to do it by your self modifying the documentation page or if you can't; then i'll do it as soon as possible).Thanks very much!
-
reinchek →
committed 5cb1fd65 on 2.x authored by
ricovandevin →
Resolve #3383370 "Allow sorting results"
-
reinchek →
committed 5cb1fd65 on 2.x authored by
ricovandevin →
- 🇮🇹Italy reinchek Napoli 🌋, 🇮🇹
Hi @ricovandevin, i merged all things into 2.1.0, a new major release.
I've also wrote the documentation part about your ResultsEvent.Here a summary:
---
ResultsEvent for Data ManipulationStarting from version 2.1.0, the Migrate Source GraphQL module introduces the ResultsEvent, allowing other modules to modify the results obtained from a GraphQL query during migration.
Key Features- getResults(): Retrieves the current query results.
- setResults(array $results): Allows modification of these results.Usage Example
Modules can subscribe to the ResultsEvent to manipulate the migration data:use Drupal\migrate_source_graphql\Event\ResultsEvent; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class MyModuleSubscriber implements EventSubscriberInterface { public static function getSubscribedEvents() { return [ResultsEvent::class => 'onResultsEvent']; } public function onResultsEvent(ResultsEvent $event) { $results = $event->getResults(); // Custom modifications to results. $results['custom_field'] = 'custom_value'; $event->setResults($results); } }
The GraphQL plugin now dispatches this event, enabling custom data handling during migrations.
Thanks
- Status changed to Fixed
3 months ago 5:52pm 4 September 2024 - 🇮🇹Italy reinchek Napoli 🌋, 🇮🇹
MR was merged into 2.1.0, a new major release.
I've also wrote the documentation part about your ResultsEvent. - Status changed to Fixed
3 months ago 5:52pm 4 September 2024