{"size": 1738, "ext": "js", "max_stars_repo_path": "src/resources/4_0_0/profiles/researchstudy/query.js", "max_stars_repo_name": "jeffkurian/graphql-fhir", "max_stars_repo_stars_event_min_datetime": "2018-07-06T18:46:09.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-14T03:42:28.000Z", "max_issues_repo_path": "src/resources/4_0_0/profiles/researchstudy/query.js", "max_issues_repo_name": "jeffkurian/graphql-fhir", "max_issues_repo_issues_event_min_datetime": "2018-07-16T16:43:56.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-19T22:48:56.000Z", "max_forks_repo_path": "src/resources/4_0_0/profiles/researchstudy/query.js", "max_forks_repo_name": "jeffkurian/graphql-fhir", "max_forks_repo_forks_event_min_datetime": "2018-09-04T20:48:11.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-04T14:34:15.000Z"}
{"max_stars_count": 144, "max_issues_count": 53, "max_forks_count": 44, "avg_line_length": 26.3333333333, "max_line_length": 84, "alphanum_fraction": 0.7566168009}
// Schemas
const OperationOutcome = require('../../inputs/operationoutcome.input.js');
const ResearchStudySchema = require('../../schemas/researchstudy.schema.js');
const BundleSchema = require('../../schemas/bundle.schema.js');

// Arguments
const ResearchStudyArgs = require('../../parameters/researchstudy.parameters.js');
const ResourceArgs = require('../../parameters/resource.parameters.js');
const DomainResourceArgs = require('../../parameters/domainresource.parameters.js');

let args = Object.assign(
	{},
	DomainResourceArgs,
	ResourceArgs,
	ResearchStudyArgs,
);

// Resolvers
const {
	getResearchStudy,
	getResearchStudyList,
	getResearchStudyInstance,
} = require('./resolver');

// Scope Utilities
const scopeInvariant = require('@asymmetrik/sof-graphql-invariant');

let scopeOptions = {
	schema: OperationOutcome,
	name: 'ResearchStudy',
	action: 'read',
};

/**
 * @name exports.ResearchStudyQuery
 * @summary ResearchStudy query.
 */
module.exports.ResearchStudyQuery = {
	description: 'Query for a single ResearchStudy',
	resolve: scopeInvariant(scopeOptions, getResearchStudy),
	type: ResearchStudySchema,
	args: args,
};

/**
 * @name exports.ResearchStudyListQuery
 * @summary ResearchStudy query.
 */
module.exports.ResearchStudyListQuery = {
	description: 'Query for a more than or just one ResearchStudy',
	resolve: scopeInvariant(scopeOptions, getResearchStudyList),
	type: BundleSchema,
	args: args,
};

/**
 * @name exports.ResearchStudyInstanceQuery
 * @summary ResearchStudy query.
 */
module.exports.ResearchStudyInstanceQuery = {
	description: 'Access information about a single ResearchStudy',
	resolve: scopeInvariant(scopeOptions, getResearchStudyInstance),
	type: ResearchStudySchema,
	args: args,
};
