How to use the graphql.GraphQLInputObjectType function in graphql

To help you get started, we’ve selected a few graphql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github parse-community / parse-server / src / GraphQL / loaders / defaultGraphQLTypes.js View on Github external
fields: {
    equalTo: equalTo(BYTES),
    notEqualTo: notEqualTo(BYTES),
    lessThan: lessThan(BYTES),
    lessThanOrEqualTo: lessThanOrEqualTo(BYTES),
    greaterThan: greaterThan(BYTES),
    greaterThanOrEqualTo: greaterThanOrEqualTo(BYTES),
    in: inOp(BYTES),
    notIn: notIn(BYTES),
    exists,
    inQueryKey,
    notInQueryKey,
  },
});

const FILE_WHERE_INPUT = new GraphQLInputObjectType({
  name: 'FileWhereInput',
  description:
    'The FileWhereInput input type is used in operations that involve filtering objects by a field of type File.',
  fields: {
    equalTo: equalTo(FILE),
    notEqualTo: notEqualTo(FILE),
    lessThan: lessThan(FILE),
    lessThanOrEqualTo: lessThanOrEqualTo(FILE),
    greaterThan: greaterThan(FILE),
    greaterThanOrEqualTo: greaterThanOrEqualTo(FILE),
    in: inOp(FILE),
    notIn: notIn(FILE),
    exists,
    matchesRegex,
    options,
    inQueryKey,
github Asymmetrik / graphql-fhir / src / resources / 3_0_1 / inputs / diagnosticreportimage.input.js View on Github external
const {
	GraphQLString,
	GraphQLList,
	GraphQLNonNull,
	GraphQLInputObjectType,
} = require('graphql');

/**
 * @name exports
 * @summary DiagnosticReportimage Input Schema
 */
module.exports = new GraphQLInputObjectType({
	name: 'DiagnosticReportimage_Input',
	description: '',
	fields: () => ({
		_id: {
			type: require('./element.input.js'),
			description:
				'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.',
		},
		id: {
			type: GraphQLString,
			description:
				'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.',
		},
		extension: {
			type: new GraphQLList(require('./extension.input.js')),
			description:
github Asymmetrik / graphql-fhir / src / resources / 3_0_1 / inputs / imagingmanifeststudyseries.input.js View on Github external
const {
	GraphQLString,
	GraphQLList,
	GraphQLNonNull,
	GraphQLInputObjectType,
} = require('graphql');
const OidScalar = require('../scalars/oid.scalar.js');

/**
 * @name exports
 * @summary ImagingManifeststudyseries Input Schema
 */
module.exports = new GraphQLInputObjectType({
	name: 'ImagingManifeststudyseries_Input',
	description: '',
	fields: () => ({
		_id: {
			type: require('./element.input.js'),
			description:
				'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.',
		},
		id: {
			type: GraphQLString,
			description:
				'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.',
		},
		extension: {
			type: new GraphQLList(require('./extension.input.js')),
			description:
github Asymmetrik / graphql-fhir / src / resources / 3_0_1 / inputs / claimresponseadditemdetail.input.js View on Github external
const {
	GraphQLString,
	GraphQLList,
	GraphQLInputObjectType,
} = require('graphql');
const PositiveIntScalar = require('../scalars/positiveint.scalar.js');

/**
 * @name exports
 * @summary ClaimResponseaddItemdetail Input Schema
 */
module.exports = new GraphQLInputObjectType({
	name: 'ClaimResponseaddItemdetail_Input',
	description: '',
	fields: () => ({
		_id: {
			type: require('./element.input.js'),
			description:
				'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.',
		},
		id: {
			type: GraphQLString,
			description:
				'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.',
		},
		extension: {
			type: new GraphQLList(require('./extension.input.js')),
			description:
github unboundedsystems / adapt / cloud / src / swagger2gql / converter.ts View on Github external
return new GraphQLList(jsonSchema2GraphQLType(itemsName, items, tyResolverIn, inputType));
    }

    const primitive = isPrimitive(schema.type) ? tyResolver.getType(schema.type) : undefined;
    if (primitive) return primitive;

    const gqlName = makeGQLTypeName(name) + (inputType ? "_input" : "_output");
    const consArgs = {
        name: gqlName,
        description: schema.description,
    };

    if (inputType) {
        const fields = buildFieldsFromSchema(name, schema, tyResolverIn, true);
        if (!ld.isFunction(fields)) return fields;
        return new GraphQLInputObjectType({ ...consArgs, fields });
    } else {
        //FIXME(manishv) attach resolvers somewhere
        const fields = buildFieldsFromSchema(name, schema, tyResolverIn, false);
        if (!ld.isFunction(fields)) return fields;
        return new GraphQLObjectType({ ...consArgs, fields });
    }
}
github mattkrick / meatier / src / server / graphql / models / Notes / noteSchema.js View on Github external
title: {type: new GraphQLNonNull(GraphQLTitleType), description: 'The lane title'},
    index: {type: new GraphQLNonNull(GraphQLInt), description: 'The index of the note in its lane'},
    createdAt: {type: GraphQLString, description: 'The datetime the lane was created'},
    updatedAt: {type: GraphQLString, description: 'The datetime the lane was last updated'}
  })
});

const inputFields = {
  id: {type: GraphQLID, description: 'The laneId'},
  userId: {type: GraphQLID, description: 'The userId that created the lane'},
  title: {type: GraphQLTitleType, description: 'The lane title'},
  index: {type: GraphQLInt, description: 'The index of the note in its lane'},
  laneId: {type: GraphQLID, description: 'The laneId that the note belongs to'}
};

export const UpdatedNote = new GraphQLInputObjectType({
  name: 'UpdatedNote',
  description: 'Args to update a note in a kanban lane',
  fields: () => makeRequired(inputFields, ['id'])
});

export const NewNote = new GraphQLInputObjectType({
  name: 'NewNote',
  description: 'Args to add a note in kanban lane',
  fields: () => makeRequired(inputFields, ['userId', 'title', 'index', 'laneId'])
});
github Asymmetrik / graphql-fhir / src / resources / 3_0_1 / inputs / groupmember.input.js View on Github external
const {
	GraphQLString,
	GraphQLList,
	GraphQLNonNull,
	GraphQLBoolean,
	GraphQLInputObjectType,
} = require('graphql');

/**
 * @name exports
 * @summary Groupmember Input Schema
 */
module.exports = new GraphQLInputObjectType({
	name: 'Groupmember_Input',
	description: '',
	fields: () => ({
		_id: {
			type: require('./element.input.js'),
			description:
				'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.',
		},
		id: {
			type: GraphQLString,
			description:
				'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.',
		},
		extension: {
			type: new GraphQLList(require('./extension.input.js')),
			description:
github Asymmetrik / graphql-fhir / src / resources / 3_0_1 / inputs / implementationguidepage.input.js View on Github external
const {
	GraphQLString,
	GraphQLList,
	GraphQLNonNull,
	GraphQLInputObjectType,
} = require('graphql');
const UriScalar = require('../scalars/uri.scalar.js');
const CodeScalar = require('../scalars/code.scalar.js');

/**
 * @name exports
 * @summary ImplementationGuidepage Input Schema
 */
module.exports = new GraphQLInputObjectType({
	name: 'ImplementationGuidepage_Input',
	description: '',
	fields: () => ({
		_id: {
			type: require('./element.input.js'),
			description:
				'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.',
		},
		id: {
			type: GraphQLString,
			description:
				'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.',
		},
		extension: {
			type: new GraphQLList(require('./extension.input.js')),
			description:
github Asymmetrik / graphql-fhir / src / resources / 1_0_2 / inputs / operationdefinitionparameter.input.js View on Github external
const {
	GraphQLList,
	GraphQLNonNull,
	GraphQLInt,
	GraphQLString,
	GraphQLInputObjectType,
} = require('graphql');
const IdScalar = require('../scalars/id.scalar.js');
const CodeScalar = require('../scalars/code.scalar.js');

/**
 * @name exports
 * @summary OperationDefinitionparameter Input Schema
 */
module.exports = new GraphQLInputObjectType({
	name: 'OperationDefinitionparameter_Input',
	description: '',
	fields: () => ({
		_id: {
			type: require('./element.input.js'),
			description:
				'unique id for the element within a resource (for internal references).',
		},
		id: {
			type: IdScalar,
			description:
				'unique id for the element within a resource (for internal references).',
		},
		extension: {
			type: new GraphQLList(require('./extension.input.js')),
			description:
github Asymmetrik / graphql-fhir / src / resources / 3_0_1 / inputs / requestgroup.input.js View on Github external
GraphQLNonNull,
	GraphQLEnumType,
	GraphQLList,
	GraphQLString,
	GraphQLInputObjectType,
} = require('graphql');
const IdScalar = require('../scalars/id.scalar.js');
const UriScalar = require('../scalars/uri.scalar.js');
const CodeScalar = require('../scalars/code.scalar.js');
const DateTimeScalar = require('../scalars/datetime.scalar.js');

/**
 * @name exports
 * @summary RequestGroup Input Schema
 */
module.exports = new GraphQLInputObjectType({
	name: 'RequestGroup_Input',
	description: 'Base StructureDefinition for RequestGroup Resource',
	fields: () => ({
		resourceType: {
			type: new GraphQLNonNull(
				new GraphQLEnumType({
					name: 'RequestGroup_Enum_input',
					values: { RequestGroup: { value: 'RequestGroup' } },
				}),
			),
			description: 'Type of resource',
		},
		_id: {
			type: require('./element.input.js'),
			description:
				'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.',