mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
39 lines
1.1 KiB
JavaScript
39 lines
1.1 KiB
JavaScript
export default {
|
|
Query: {
|
|
Post: async (resolve, root, args, context, info) => {
|
|
if (typeof args.deleted !== 'boolean') {
|
|
args.deleted = false
|
|
}
|
|
if (typeof args.disabled !== 'boolean') {
|
|
args.disabled = false
|
|
}
|
|
const result = await resolve(root, args, context, info)
|
|
return result
|
|
},
|
|
Comment: async (resolve, root, args, context, info) => {
|
|
// if (typeof args.deleted !== 'boolean') {
|
|
// args.deleted = false
|
|
// }
|
|
// if (typeof args.disabled !== 'boolean') {
|
|
// args.disabled = false
|
|
// }
|
|
const result = await resolve(root, args, context, info)
|
|
return result
|
|
},
|
|
User: async (resolve, root, args, context, info) => {
|
|
if (typeof args.deleted !== 'boolean') {
|
|
args.deleted = false
|
|
}
|
|
if (typeof args.disabled !== 'boolean') {
|
|
args.disabled = false
|
|
}
|
|
// console.log('ROOT', root)
|
|
// console.log('ARGS', args)
|
|
// console.log('CONTEXT', context)
|
|
// console.log('info', info.fieldNodes[0].arguments)
|
|
const result = await resolve(root, args, context, info)
|
|
return result
|
|
}
|
|
}
|
|
}
|