graphql-scalars icon indicating copy to clipboard operation
graphql-scalars copied to clipboard

Add support for Kosovo country code `XK`

Open Ignigena opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

When using the CountryCode scalar, errors are thrown whenever the XK country code is returned.

The ISO standard has not assigned Kosovo a permanent country code (FIPS has assigned KV) so the EU, IMF and SWIFT have temporarily adopted one of the unused codes which ISO has made available for "user specified elements":

If users need code elements to represent country names not included in this part of ISO 3166, the series of letters AA, QM to QZ, XA to XZ, and ZZ, and the series AAA to AAZ, QMA to QZZ, XAA to XZZ, and ZZA to ZZZ respectively and the series of numbers 900 to 999 are available.

Describe the solution you'd like

Allow XK to be returned as a valid country code, update as necessary when a permanent assignment is made by the ISO standard.

Describe alternatives you've considered

It may be worth considering allowing any of the unused codes to be returned since this is part of the spec. While this would be a bit more than just updating the hardcoded regex set, it would further differentiate between the official ISO assignments and those that are not standard according to ISO but may have been adopted for use by other organizations.

Additional context

Ignigena avatar Jul 11 '23 20:07 Ignigena