mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
refactor(backend): move resolvers into graphql folder (#8470)
* move resolvers into graphql folder * lint fixes
This commit is contained in:
parent
5e24f51cf7
commit
839ffb29ee
@ -10,7 +10,7 @@ import { Factory } from 'rosie'
|
||||
import slugify from 'slug'
|
||||
import { v4 as uuid } from 'uuid'
|
||||
|
||||
import generateInviteCode from '@schema/resolvers/helpers/generateInviteCode'
|
||||
import generateInviteCode from '@graphql/resolvers/helpers/generateInviteCode'
|
||||
|
||||
import { getDriver, getNeode } from './neo4j'
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ import { throwError, concat } from 'rxjs'
|
||||
import { flatMap, mergeMap, map, catchError, filter } from 'rxjs/operators'
|
||||
|
||||
import { getDriver } from '@db/neo4j'
|
||||
import normalizeEmail from '@schema/resolvers/helpers/normalizeEmail'
|
||||
import normalizeEmail from '@graphql/resolvers/helpers/normalizeEmail'
|
||||
|
||||
export const description = `
|
||||
This migration merges duplicate :User and :EmailAddress nodes. It became
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
import { mergeWith, isArray } from 'lodash'
|
||||
|
||||
import { getMutedUsers } from '@schema/resolvers/users'
|
||||
import { getMutedUsers } from '@graphql/resolvers/users'
|
||||
|
||||
export const filterForMutedUsers = async (params, context) => {
|
||||
if (!context.user) return params
|
||||
@ -1,9 +1,11 @@
|
||||
/* eslint-disable import/no-cycle */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable security/detect-object-injection */
|
||||
import { getUnreadRoomsCount } from '@graphql/resolvers/rooms'
|
||||
import { sendMail } from '@middleware/helpers/email/sendMail'
|
||||
import {
|
||||
chatMessageTemplate,
|
||||
@ -11,8 +13,6 @@ import {
|
||||
} from '@middleware/helpers/email/templateBuilder'
|
||||
import { isUserOnline } from '@middleware/helpers/isUserOnline'
|
||||
import { validateNotifyUsers } from '@middleware/validation/validationMiddleware'
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
import { getUnreadRoomsCount } from '@schema/resolvers/rooms'
|
||||
import { pubsub, NOTIFICATION_ADDED, ROOM_COUNT_UPDATED, CHAT_MESSAGE_ADDED } from '@src/server'
|
||||
|
||||
import extractMentionedUsers from './mentions/extractMentionedUsers'
|
||||
|
||||
@ -8,8 +8,8 @@ import { rule, shield, deny, allow, or, and } from 'graphql-shield'
|
||||
|
||||
import CONFIG from '@config/index'
|
||||
import { getNeode } from '@db/neo4j'
|
||||
import { validateInviteCode } from '@graphql/resolvers/transactions/inviteCodes'
|
||||
import SocialMedia from '@models/SocialMedia'
|
||||
import { validateInviteCode } from '@schema/resolvers/transactions/inviteCodes'
|
||||
|
||||
const debug = !!CONFIG.DEBUG
|
||||
const allowExternalErrors = true
|
||||
|
||||
@ -18,10 +18,10 @@ import Redis from 'ioredis'
|
||||
|
||||
import CONFIG from './config'
|
||||
import { getNeode, getDriver } from './db/neo4j'
|
||||
import schema from './graphql/schema'
|
||||
import decode from './jwt/decode'
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
import middleware from './middleware'
|
||||
import schema from './schema'
|
||||
|
||||
export const NOTIFICATION_ADDED = 'NOTIFICATION_ADDED'
|
||||
export const CHAT_MESSAGE_ADDED = 'CHAT_MESSAGE_ADDED'
|
||||
|
||||
@ -38,7 +38,6 @@
|
||||
"@jwt/*": ["./src/jwt/*"],
|
||||
"@middleware/*": ["./src/middleware/*"],
|
||||
"@models/*": ["./src/models/*"],
|
||||
"@schema/*": ["./src/schema/*"],
|
||||
"@src/*": ["./src/*"],
|
||||
"@root/*": ["./*"]
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user