mirror of https://github.com/requarks/wiki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.3 KiB
42 lines
1.3 KiB
7 years ago
|
const _ = require('lodash')
|
||
7 years ago
|
const fs = require('fs')
|
||
7 years ago
|
const gqlTools = require('graphql-tools')
|
||
7 years ago
|
const path = require('path')
|
||
7 years ago
|
|
||
|
/* global wiki */
|
||
8 years ago
|
|
||
7 years ago
|
const typeDefs = fs.readFileSync(path.join(wiki.SERVERPATH, 'schemas/types.graphql'), 'utf8')
|
||
8 years ago
|
|
||
7 years ago
|
const DateScalar = require('../schemas/scalar-date')
|
||
7 years ago
|
const AuthenticationResolvers = require('../schemas/resolvers-authentication')
|
||
7 years ago
|
const CommentResolvers = require('../schemas/resolvers-comment')
|
||
7 years ago
|
const DocumentResolvers = require('../schemas/resolvers-document')
|
||
7 years ago
|
const FileResolvers = require('../schemas/resolvers-file')
|
||
7 years ago
|
const FolderResolvers = require('../schemas/resolvers-folder')
|
||
7 years ago
|
const GroupResolvers = require('../schemas/resolvers-group')
|
||
7 years ago
|
const SettingResolvers = require('../schemas/resolvers-setting')
|
||
7 years ago
|
const TagResolvers = require('../schemas/resolvers-tag')
|
||
7 years ago
|
const TranslationResolvers = require('../schemas/resolvers-translation')
|
||
7 years ago
|
const UserResolvers = require('../schemas/resolvers-user')
|
||
|
|
||
7 years ago
|
const resolvers = _.merge(
|
||
7 years ago
|
AuthenticationResolvers,
|
||
7 years ago
|
CommentResolvers,
|
||
7 years ago
|
DocumentResolvers,
|
||
7 years ago
|
FileResolvers,
|
||
7 years ago
|
FolderResolvers,
|
||
7 years ago
|
GroupResolvers,
|
||
7 years ago
|
SettingResolvers,
|
||
7 years ago
|
TagResolvers,
|
||
7 years ago
|
TranslationResolvers,
|
||
7 years ago
|
UserResolvers,
|
||
|
DateScalar
|
||
7 years ago
|
)
|
||
8 years ago
|
|
||
7 years ago
|
const Schema = gqlTools.makeExecutableSchema({
|
||
|
typeDefs,
|
||
|
resolvers
|
||
8 years ago
|
})
|
||
|
|
||
|
module.exports = Schema
|