Swirrl / cubiql

CubiQL: A GraphQL service for querying multidimensional Linked Data Cubes
Eclipse Public License 1.0
41 stars 2 forks source link

Multi lingual schemas? #105

Open RickMoynihan opened 6 years ago

RickMoynihan commented 6 years ago

In issue #6 we propose a method for retrieving labels in a preferred language. However there is another issue, which is what language should we use for our schema generation?

To expand our schemas derive fields and graphql ENUM names from labels in the data too. #6 only talks about what label is chosen when the query executes. This issue is about how to pick a language for the schema generation.

There are several options:

RickMoynihan commented 6 years ago

See also #73

RickMoynihan commented 6 years ago

NOTE: we will need to collapse unicode diacretic marks into ascii for graphql (as only a subset of ASCII is valid in GraphQL queries) we can do so with a map like this:

(def ^:private diacritical-marks-map
  (zipmap "ąàáäâãåæăćčĉęèéëêĝĥìíïîĵłľńňòóöőôõðøśșšŝťțŭùúüűûñÿýçżźž"
          "aaaaaaaaaccceeeeeghiiiijllnnoooooooossssttuuuuuunyyczzz"))