feat: GraphQL translations + login form

This commit is contained in:
NGPixel
2017-09-24 23:22:33 -04:00
parent 16a47e46ce
commit 32b7947704
32 changed files with 314 additions and 339 deletions

View File

@@ -1,4 +1,3 @@
'use strict'
/* global wiki */

View File

@@ -1,4 +1,3 @@
'use strict'
/* global wiki */

View File

@@ -1,4 +1,3 @@
'use strict'
/* global wiki */

View File

@@ -1,4 +1,3 @@
'use strict'
/* global wiki */

View File

@@ -1,4 +1,3 @@
'use strict'
/* global wiki */

View File

@@ -1,4 +1,3 @@
'use strict'
/* global wiki */

View File

@@ -1,4 +1,3 @@
'use strict'
/* global wiki */

View File

@@ -1,4 +1,3 @@
'use strict'
/* global wiki */

View 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: {}
}

View File

@@ -1,4 +1,3 @@
'use strict'
/* global wiki */

View File

@@ -1,4 +1,3 @@
'use strict'
const gql = require('graphql')

View File

@@ -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]
}