mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
also wildcard include resolvers
This commit is contained in:
parent
4c758a9083
commit
754decd308
@ -1,40 +1,2 @@
|
||||
// resolvers
|
||||
import userManagement from './resolvers/user_management.js'
|
||||
import statistics from './resolvers/statistics.js'
|
||||
import reports from './resolvers/reports.js'
|
||||
import posts from './resolvers/posts.js'
|
||||
import moderation from './resolvers/moderation.js'
|
||||
import follow from './resolvers/follow.js'
|
||||
import shout from './resolvers/shout.js'
|
||||
import rewards from './resolvers/rewards.js'
|
||||
import socialMedia from './resolvers/socialMedia.js'
|
||||
import notifications from './resolvers/notifications'
|
||||
import comments from './resolvers/comments'
|
||||
import users from './resolvers/users'
|
||||
|
||||
// types
|
||||
import types from './types'
|
||||
|
||||
export const typeDefs = types
|
||||
|
||||
export const resolvers = {
|
||||
Query: {
|
||||
...statistics.Query,
|
||||
...userManagement.Query,
|
||||
...notifications.Query,
|
||||
...comments.Query,
|
||||
},
|
||||
Mutation: {
|
||||
...userManagement.Mutation,
|
||||
...reports.Mutation,
|
||||
...posts.Mutation,
|
||||
...moderation.Mutation,
|
||||
...follow.Mutation,
|
||||
...shout.Mutation,
|
||||
...rewards.Mutation,
|
||||
...socialMedia.Mutation,
|
||||
...notifications.Mutation,
|
||||
...comments.Mutation,
|
||||
...users.Mutation,
|
||||
},
|
||||
}
|
||||
export { default as typeDefs } from './types'
|
||||
export { default as resolvers } from './resolvers'
|
||||
|
||||
6
backend/src/resolvers/index.js
Normal file
6
backend/src/resolvers/index.js
Normal file
@ -0,0 +1,6 @@
|
||||
import path from 'path'
|
||||
import { fileLoader, mergeResolvers } from 'merge-graphql-schemas'
|
||||
|
||||
const resolversArray = fileLoader(path.join(__dirname, './'), { extensions: ['!(*.spec).js'] })
|
||||
|
||||
export default mergeResolvers(resolversArray)
|
||||
Loading…
x
Reference in New Issue
Block a user