first commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* active Resolve Single
|
||||
* @copyright 2021 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
const { ApolloError } = require('apollo-server-express');
|
||||
const graphqlFields = require('graphql-fields');
|
||||
|
||||
module.exports = async (_, {id}, {db}, info) => {
|
||||
try {
|
||||
const attributes = db.active.intersection(graphqlFields(info));
|
||||
|
||||
return await db.active.getByPK(id);
|
||||
} catch (error) {
|
||||
console.log('single_active -> error', error);
|
||||
return new ApolloError('InternalServerError');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* activity_log Resolve Single
|
||||
* @copyright 2021 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
const { ApolloError } = require('apollo-server-express');
|
||||
const graphqlFields = require('graphql-fields');
|
||||
|
||||
module.exports = async (_, {id}, {db}, info) => {
|
||||
try {
|
||||
const attributes = db.activity_log.intersection(graphqlFields(info));
|
||||
|
||||
return await db.activity_log.getByPK(id);
|
||||
} catch (error) {
|
||||
console.log('single_activity_log -> error', error);
|
||||
return new ApolloError('InternalServerError');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* answer Resolve Single
|
||||
* @copyright 2021 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
const { ApolloError } = require('apollo-server-express');
|
||||
const graphqlFields = require('graphql-fields');
|
||||
|
||||
module.exports = async (_, {id}, {db}, info) => {
|
||||
try {
|
||||
const attributes = db.answer.intersection(graphqlFields(info));
|
||||
|
||||
return await db.answer.getByPK(id);
|
||||
} catch (error) {
|
||||
console.log('single_answer -> error', error);
|
||||
return new ApolloError('InternalServerError');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* credential Resolve Single
|
||||
* @copyright 2021 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
const { ApolloError } = require('apollo-server-express');
|
||||
const graphqlFields = require('graphql-fields');
|
||||
|
||||
module.exports = async (_, {id}, {db}, info) => {
|
||||
try {
|
||||
const attributes = db.credential.intersection(graphqlFields(info));
|
||||
|
||||
return await db.credential.getByPK(id);
|
||||
} catch (error) {
|
||||
console.log('single_credential -> error', error);
|
||||
return new ApolloError('InternalServerError');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* image Resolve Single
|
||||
* @copyright 2021 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
const { ApolloError } = require('apollo-server-express');
|
||||
const graphqlFields = require('graphql-fields');
|
||||
|
||||
module.exports = async (_, {id}, {db}, info) => {
|
||||
try {
|
||||
const attributes = db.image.intersection(graphqlFields(info));
|
||||
|
||||
return await db.image.getByPK(id);
|
||||
} catch (error) {
|
||||
console.log('single_image -> error', error);
|
||||
return new ApolloError('InternalServerError');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* output_variable Resolve Single
|
||||
* @copyright 2021 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
const { ApolloError } = require('apollo-server-express');
|
||||
const graphqlFields = require('graphql-fields');
|
||||
|
||||
module.exports = async (_, {id}, {db}, info) => {
|
||||
try {
|
||||
const attributes = db.output_variable.intersection(graphqlFields(info));
|
||||
|
||||
return await db.output_variable.getByPK(id);
|
||||
} catch (error) {
|
||||
console.log('single_output_variable -> error', error);
|
||||
return new ApolloError('InternalServerError');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* profile_header Resolve Single
|
||||
* @copyright 2021 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
const { ApolloError } = require('apollo-server-express');
|
||||
const graphqlFields = require('graphql-fields');
|
||||
|
||||
module.exports = async (_, {id}, {db}, info) => {
|
||||
try {
|
||||
const attributes = db.profile_header.intersection(graphqlFields(info));
|
||||
|
||||
return await db.profile_header.getByPK(id);
|
||||
} catch (error) {
|
||||
console.log('single_profile_header -> error', error);
|
||||
return new ApolloError('InternalServerError');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* question Resolve Single
|
||||
* @copyright 2021 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
const { ApolloError } = require('apollo-server-express');
|
||||
const graphqlFields = require('graphql-fields');
|
||||
|
||||
module.exports = async (_, {id}, {db}, info) => {
|
||||
try {
|
||||
const attributes = db.question.intersection(graphqlFields(info));
|
||||
|
||||
return await db.question.getByPK(id);
|
||||
} catch (error) {
|
||||
console.log('single_question -> error', error);
|
||||
return new ApolloError('InternalServerError');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* quiz Resolve Single
|
||||
* @copyright 2021 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
const { ApolloError } = require('apollo-server-express');
|
||||
const graphqlFields = require('graphql-fields');
|
||||
|
||||
module.exports = async (_, {id}, {db}, info) => {
|
||||
try {
|
||||
const attributes = db.quiz.intersection(graphqlFields(info));
|
||||
|
||||
return await db.quiz.getByPK(id);
|
||||
} catch (error) {
|
||||
console.log('single_quiz -> error', error);
|
||||
return new ApolloError('InternalServerError');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* refer_log Resolve Single
|
||||
* @copyright 2021 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
const { ApolloError } = require('apollo-server-express');
|
||||
const graphqlFields = require('graphql-fields');
|
||||
|
||||
module.exports = async (_, {id}, {db}, info) => {
|
||||
try {
|
||||
const attributes = db.refer_log.intersection(graphqlFields(info));
|
||||
|
||||
return await db.refer_log.getByPK(id);
|
||||
} catch (error) {
|
||||
console.log('single_refer_log -> error', error);
|
||||
return new ApolloError('InternalServerError');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* rule Resolve Single
|
||||
* @copyright 2021 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
const { ApolloError } = require('apollo-server-express');
|
||||
const graphqlFields = require('graphql-fields');
|
||||
|
||||
module.exports = async (_, {id}, {db}, info) => {
|
||||
try {
|
||||
const attributes = db.rule.intersection(graphqlFields(info));
|
||||
|
||||
return await db.rule.getByPK(id);
|
||||
} catch (error) {
|
||||
console.log('single_rule -> error', error);
|
||||
return new ApolloError('InternalServerError');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* rules Resolve Single
|
||||
* @copyright 2021 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
const { ApolloError } = require('apollo-server-express');
|
||||
const graphqlFields = require('graphql-fields');
|
||||
|
||||
module.exports = async (_, {id}, {db}, info) => {
|
||||
try {
|
||||
const attributes = db.rules.intersection(graphqlFields(info));
|
||||
|
||||
return await db.rules.getByPK(id);
|
||||
} catch (error) {
|
||||
console.log('single_rules -> error', error);
|
||||
return new ApolloError('InternalServerError');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
|
||||
/**
|
||||
* user Resolve Single
|
||||
* @copyright 2021 Manaknightdigital Inc.
|
||||
* @link https://manaknightdigital.com
|
||||
* @license Proprietary Software licensing
|
||||
* @author Ryan Wong
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
const { ApolloError } = require('apollo-server-express');
|
||||
const graphqlFields = require('graphql-fields');
|
||||
|
||||
module.exports = async (_, {id}, {db}, info) => {
|
||||
try {
|
||||
const attributes = db.user.intersection(graphqlFields(info));
|
||||
|
||||
return await db.user.getByPK(id);
|
||||
} catch (error) {
|
||||
console.log('single_user -> error', error);
|
||||
return new ApolloError('InternalServerError');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user