2018-04-29 21:55:36 +00:00
|
|
|
# ===============================================
|
|
|
|
# LOCALIZATION
|
|
|
|
# ===============================================
|
|
|
|
|
|
|
|
extend type Query {
|
|
|
|
localization: LocalizationQuery
|
|
|
|
}
|
|
|
|
|
|
|
|
extend type Mutation {
|
|
|
|
localization: LocalizationMutation
|
|
|
|
}
|
|
|
|
|
|
|
|
# -----------------------------------------------
|
|
|
|
# QUERIES
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
|
|
|
type LocalizationQuery {
|
|
|
|
locales: [LocalizationLocale]
|
2018-05-06 20:19:37 +00:00
|
|
|
config: LocalizationConfig
|
2019-01-12 23:33:30 +00:00
|
|
|
translations(locale: String!, namespace: String!): [Translation]
|
2018-04-29 21:55:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# -----------------------------------------------
|
|
|
|
# MUTATIONS
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
|
|
|
type LocalizationMutation {
|
2018-05-07 03:21:48 +00:00
|
|
|
downloadLocale(
|
|
|
|
locale: String!
|
2018-10-14 21:38:39 +00:00
|
|
|
): DefaultResponse @auth(requires: ["manage:system"])
|
2018-05-07 03:21:48 +00:00
|
|
|
|
2018-04-29 21:55:36 +00:00
|
|
|
updateLocale(
|
2018-05-06 21:33:41 +00:00
|
|
|
locale: String!
|
2018-04-29 21:55:36 +00:00
|
|
|
autoUpdate: Boolean!
|
2018-05-28 23:36:35 +00:00
|
|
|
namespacing: Boolean!
|
|
|
|
namespaces: [String]!
|
2018-10-14 21:38:39 +00:00
|
|
|
): DefaultResponse @auth(requires: ["manage:system"])
|
2018-04-29 21:55:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# -----------------------------------------------
|
|
|
|
# TYPES
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
|
|
|
type LocalizationLocale {
|
2019-07-13 03:56:44 +00:00
|
|
|
availability: Int!
|
2018-04-29 21:55:36 +00:00
|
|
|
code: String!
|
|
|
|
createdAt: Date!
|
|
|
|
installDate: Date
|
|
|
|
isInstalled: Boolean!
|
|
|
|
isRTL: Boolean!
|
|
|
|
name: String!
|
|
|
|
nativeName: String!
|
|
|
|
updatedAt: Date!
|
|
|
|
}
|
2018-05-06 20:19:37 +00:00
|
|
|
|
|
|
|
type LocalizationConfig {
|
|
|
|
locale: String!
|
|
|
|
autoUpdate: Boolean!
|
2018-05-28 23:36:35 +00:00
|
|
|
namespacing: Boolean!
|
|
|
|
namespaces: [String]!
|
2018-05-06 20:19:37 +00:00
|
|
|
}
|
2019-01-12 23:33:30 +00:00
|
|
|
|
|
|
|
type Translation {
|
|
|
|
key: String!
|
|
|
|
value: String!
|
|
|
|
}
|