schema.graphqls 1.19 KB
Newer Older
Ketan's avatar
Ketan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
# Copyright © Magento, Inc. All rights reserved.
# See COPYING.txt for license details.

type Query {
    currency: Currency @resolver(class: "Magento\\DirectoryGraphQl\\Model\\Resolver\\Currency") @doc(description: "The currency query returns information about store currency.")
    countries: [Country] @resolver(class: "Magento\\DirectoryGraphQl\\Model\\Resolver\\Countries") @doc(description: "The countries query provides information for all countries.")
    country (id: String): Country @resolver(class: "Magento\\DirectoryGraphQl\\Model\\Resolver\\Country") @doc(description: "The countries query provides information for a single country.")
}

type Currency {
    base_currency_code: String
    base_currency_symbol: String
    default_display_currecy_code: String
    default_display_currecy_symbol: String
    available_currency_codes: [String]
    exchange_rates: [ExchangeRate]
}

type ExchangeRate {
    currency_to: String
    rate: Float
}

type Country {
    id: String
    two_letter_abbreviation: String
    three_letter_abbreviation: String
    full_name_locale: String
    full_name_english: String
    available_regions: [Region]
}

type Region {
    id: Int
    code: String
    name: String
}