The following below steps need to follow to get store Currency By Using GraphQL in Magento 2.x / Adobe Commerce 2.x
Step [1] – Recommendation to use below Currency syntax
Here Using Postman
Syntax –
{currency {Currency}
Step [2] – Put below Request
query {
currency {
base_currency_code
base_currency_symbol
default_display_currency_code
default_display_currency_symbol
available_currency_codes
exchange_rates {
currency_to
rate
}
}
}
Step [3] – Below output response
{
"data": {
"currency": {
"base_currency_code": "USD",
"base_currency_symbol": "$",
"default_display_currency_code": "USD",
"default_display_currency_symbol": "$",
"available_currency_codes": [
"EUR",
"USD"
],
"exchange_rates": [
{
"currency_to": "EUR",
"rate": 0.8067
},
{
"currency_to": "USD",
"rate": 1
}
]
}
}
}
available_currency_codes = Three-letter currency code, such as USD and EUR
base_currency_code = The base currency as USD
base_currency_symbol = The base currency symbol such as $
default_display_currency_code = The Default currency code
default_display_currency_symbol = The Default currency code symbol