We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variablesを利用しないで引数を指定した場合に出荷日の登録ができない不具合があります。
文字列から DataTime へは DateTimeType::parseValue() で変換しています。
DataTime
DateTimeType::parseValue()
eccube-api4/GraphQL/Type/Definition/DateTimeType.php
Lines 59 to 67 in e2d2692
Mutationのリゾルバ内で引数を利用していますが、リゾルバ実行時点で文字列のまま引数が渡される場合があります。 リクエストの引数の指定の方法の違いでこちらの処理を通らないで文字列のまま場合があるようです。
eccube-api4/GraphQL/Mutation/UpdateShippedMutation.php
Line 130 in e2d2692
mutation UpdateShipped { updateShipped ( id: 1, shipping_date: "2020-05-18T12:57:08+09:00" ) { id shipping_date } }
こちらの場合はリゾルバ実行時点で $args から文字列が取得できます。
$args
mutation UpdateShipped ( $shipping_date: DateTime ){ updateShipped ( id: 99, shipping_date: $shipping_date ) { id shipping_date } }
{ "shipping_date": "2020-05-18T12:57:08+09:00" }
こちらの場合はリゾルバ実行時点で $args から DateTime が取得できます。
DateTime
リゾルバで文字列か DateTime か調べることで回避できますが、他のクエリでも起こり得ることかと思いますので、原因の追究はしておきたいです。
The text was updated successfully, but these errors were encountered:
GraphQLのドキュメントを読んでみましたが、Variablesを利用するかどうかで挙動の違いについての記載はありませんでした。 https://graphql.org/learn/queries/
いったん、文字列がきても DateTime がきても問題がないように修正しようと思います。
Sorry, something went wrong.
#80 で修正されました。
No branches or pull requests
Variablesを利用しないで引数を指定した場合に出荷日の登録ができない不具合があります。
文字列から
DataTime
へはDateTimeType::parseValue()
で変換しています。eccube-api4/GraphQL/Type/Definition/DateTimeType.php
Lines 59 to 67 in e2d2692
Mutationのリゾルバ内で引数を利用していますが、リゾルバ実行時点で文字列のまま引数が渡される場合があります。
リクエストの引数の指定の方法の違いでこちらの処理を通らないで文字列のまま場合があるようです。
eccube-api4/GraphQL/Mutation/UpdateShippedMutation.php
Line 130 in e2d2692
引数を直接指定する場合
こちらの場合はリゾルバ実行時点で
$args
から文字列が取得できます。引数をvariablesで指定する場合
こちらの場合はリゾルバ実行時点で
$args
からDateTime
が取得できます。リゾルバで文字列か
DateTime
か調べることで回避できますが、他のクエリでも起こり得ることかと思いますので、原因の追究はしておきたいです。The text was updated successfully, but these errors were encountered: