From 57772e8f10baec644bc31dea94f64b165b6a10da Mon Sep 17 00:00:00 2001 From: Christopher Daniel Date: Mon, 4 Jan 2021 17:14:55 +0530 Subject: [PATCH 1/2] currency symbol --- .../coverage/store-currency-symbol.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 design-documents/graph-ql/coverage/store-currency-symbol.md diff --git a/design-documents/graph-ql/coverage/store-currency-symbol.md b/design-documents/graph-ql/coverage/store-currency-symbol.md new file mode 100644 index 000000000..b1d21ce38 --- /dev/null +++ b/design-documents/graph-ql/coverage/store-currency-symbol.md @@ -0,0 +1,24 @@ +# Coverage for currency symbol + +Magento allows to use custom currency symbol.The current graphql implementation does not fully support custom currency symbol feature. The currency query only returns base currency symbol and current store default currency symbol. + `available_currency_codes` should be deprecated and instead `available_currency` field should be added, or both should be kept + + ## Schema +```graphql +type CurrencyData { + currency_code: String + currency_symbol: String +} + +type Currency { + available_currency_codes: [String] @deprecated + base_currency_code: String + base_currency_symbol: String + default_display_currency_code: String + default_display_currency_symbol: String + exchange_rates: [ExchangeRate] + available_currency: [CurrencyData!]! +} +``` + +All the currency symbol fields should be moved to CurrencySymbolGraphQl module and schema stitched to currency type. \ No newline at end of file From bd4b54c4a0cdf81cad6d645bef615933263dd9bb Mon Sep 17 00:00:00 2001 From: Christopher Daniel Date: Wed, 20 Jan 2021 10:45:54 +0530 Subject: [PATCH 2/2] changed type names --- .../coverage/store-currency-symbol.md | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/design-documents/graph-ql/coverage/store-currency-symbol.md b/design-documents/graph-ql/coverage/store-currency-symbol.md index b1d21ce38..b67331099 100644 --- a/design-documents/graph-ql/coverage/store-currency-symbol.md +++ b/design-documents/graph-ql/coverage/store-currency-symbol.md @@ -5,19 +5,32 @@ Magento allows to use custom currency symbol.The current graphql implementation ## Schema ```graphql -type CurrencyData { +type CurrencyObject { currency_code: String currency_symbol: String } -type Currency { - available_currency_codes: [String] @deprecated +type CurrencySettings { base_currency_code: String base_currency_symbol: String default_display_currency_code: String default_display_currency_symbol: String exchange_rates: [ExchangeRate] - available_currency: [CurrencyData!]! + available_currency: [CurrencyObject!]! +} + +type Currency @deprecated { + available_currency_codes: [String] + base_currency_code: String + base_currency_symbol: String + default_display_currency_code: String + default_display_currency_symbol: String + exchange_rates: [ExchangeRate] +} + +type Query { + currency: Currency @deprecated(description: "use `currency_settings` instead") + currency_settings: CurrencySettings } ```