feat: GraphQL translations + login form
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
'use strict'
|
||||
|
||||
/* global wiki */
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
'use strict'
|
||||
|
||||
/* global wiki */
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
'use strict'
|
||||
|
||||
/* global wiki */
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
'use strict'
|
||||
|
||||
/* global wiki */
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
'use strict'
|
||||
|
||||
/* global wiki */
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
'use strict'
|
||||
|
||||
/* global wiki */
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
'use strict'
|
||||
|
||||
/* global wiki */
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
'use strict'
|
||||
|
||||
/* global wiki */
|
||||
|
||||
|
12
server/schemas/resolvers-translation.js
Normal file
12
server/schemas/resolvers-translation.js
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
/* global wiki */
|
||||
|
||||
module.exports = {
|
||||
Query: {
|
||||
translations (obj, args, context, info) {
|
||||
return wiki.lang.getByNamespace(args.locale, args.namespace)
|
||||
}
|
||||
},
|
||||
Mutation: {},
|
||||
Translation: {}
|
||||
}
|
@@ -1,4 +1,3 @@
|
||||
'use strict'
|
||||
|
||||
/* global wiki */
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
'use strict'
|
||||
|
||||
const gql = require('graphql')
|
||||
|
||||
|
@@ -114,6 +114,11 @@ type Tag implements Base {
|
||||
documents: [Document]
|
||||
}
|
||||
|
||||
type Translation {
|
||||
key: String!
|
||||
value: String!
|
||||
}
|
||||
|
||||
# A User
|
||||
type User implements Base {
|
||||
id: Int!
|
||||
@@ -142,6 +147,7 @@ type Query {
|
||||
rights(id: Int): [Right]
|
||||
settings(key: String): [Setting]
|
||||
tags(key: String): [Tag]
|
||||
translations(locale: String!, namespace: String!): [Translation]
|
||||
users(id: Int, email: String, provider: String, providerId: String, role: UserRole): [User]
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user