- Issue created by @bander2
- 🇮🇹Italy reinchek Napoli 🌋, 🇮🇹
Thank you @bander2 for the preliminary analysis you provided me.
I will try to understand it better and propose a solution as soon as possible. - 🇮🇹Italy reinchek Napoli 🌋, 🇮🇹
Hi @bander2, i ran a quick check and fortunately there's no bug.
The problem lies in your configuration. The data_key property shold be specified under `source:` and not before. You can also see this from the documentation on the module's home page.
As you can see by using the following migration:id: migrate_morty label: Migrate Morty to Articles migration_tags: null source: plugin: graphql endpoint: https://rickandmortyapi.com/graphql data_key: results query: characters: arguments: filter: name: "Morty" fields: - results: - id - name ids: id: type: string process: title: name destination: plugin: 'entity:node' default_bundle: article
I got the desired result:
I close the issue, thank you.
- Status changed to Closed: works as designed
almost 2 years ago 7:04pm 14 February 2023 - 🇺🇸United States bander2
I am still getting this with your migration on a fresh install:
Drupal: 9.5.3
PHP: 8.0.27
Drush: 9.0.27
Migrate Source GraphQL: 2.03Running
drush mim migrate_morty -v
gives me:In Results.php line 54: [GraphQL\Exception\QueryError] Expected type String, found Morty.
drush migrate:status -v
produces this output.[error] Could not retrieve source count from migrate_morty: Expected type String, found Morty. [error] Could not retrieve source count from migrate_morty: Expected type String, found Morty. [error] Could not retrieve source count from migrate_morty: Expected type String, found Morty. --------------- -------- ------- ---------- ------------- --------------- Migration ID Status Total Imported Unprocessed Last Imported --------------- -------- ------- ---------- ------------- --------------- migrate_morty Idle N/A 0 N/A --------------- -------- ------- ---------- ------------- ---------------
The error itself comes from the endpoint. I believe that we are intending to send a query like this:
query Query { characters(filter: {name: "Morty"}) { results { id name } } }
But instead are sending:
query Query { characters(filter: {name: Morty}) { results { id name } } }
I don't know what the difference could be between your environment and mine that would account for this.
- 🇮🇹Italy reinchek Napoli 🌋, 🇮🇹
Hi @bander2, i will check again and let you know soon.
- Status changed to Needs work
almost 2 years ago 9:02am 16 February 2023 - 🇮🇹Italy reinchek Napoli 🌋, 🇮🇹
Hi @bander2, i've switched on your same fresh install, and yes. I've the same your error.
I'm working on a patch.
Which I will release as soon as possible.
Thank you. - 🇮🇹Italy reinchek Napoli 🌋, 🇮🇹
Hi @bander2, i've made a patch 3341694_string_arguments_not_possible.patch 3341694_string_arguments_not_possible.patch →
The patch includes:
- Fix for string arguments
- Multiple arguments now are supported
- Errors are now shown directly as drush output without -vvv needs.I will include this patch for the 2.0.4 version on which i'm currently working.
Thank's, let me know how is it. -
reinchek →
authored eb027687 on 2.0
Issue #3341694 by reinchek: String arguments are not possible
-
reinchek →
authored eb027687 on 2.0
- Status changed to Needs review
almost 2 years ago 10:26am 16 February 2023 - Status changed to Fixed
almost 2 years ago 11:28am 16 February 2023 - 🇮🇹Italy reinchek Napoli 🌋, 🇮🇹
Hi @bander2,
I have performed further tests and can confirm that it is now working correctly.
I have released everything in the new version 2.0.4.
Thank you. - Status changed to Fixed
almost 2 years ago 11:30am 16 February 2023