Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
interface: {type: NameInterface},
enum: {type: EnumType},
scalar: { type: GraphQLString },
complexScalar: { type: GraphQLString, complexity: 20 },
union: { type: Union },
variableScalar: {
type: Item,
complexity: (args: ComplexityEstimatorArgs) => 10 * (args.args.count || 10),
args: {
count: {
type: GraphQLInt
}
}
},
list: { type: new GraphQLList(Item) },
nonNullItem: {
type: new GraphQLNonNull(Item),
resolve: () => ({}),
},
nonNullList: {
type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(Item))),
resolve: () => [],
},
requiredArgs: {
type: Item,
args: {
count: {
type: new GraphQLNonNull(GraphQLInt)
}
}
},
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:
'May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.',
},
modifierExtension: {
type: new GraphQLList(require('./extension.input.js')),
description:
'May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.',
},
action: {
type: new GraphQLList(
new GraphQLNonNull(require('./testreportsetupaction.input.js')),
),
description: 'Action would contain either an operation or an assertion.',
},
}),
});
dependency: {
type: new GraphQLList(
require('./implementationguidedependency.schema.js'),
),
description:
'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.',
},
package: {
type: new GraphQLList(
new GraphQLNonNull(require('./implementationguidepackage.schema.js')),
),
description:
'A logical group of resources. Logical groups can be used when building pages.',
},
global: {
type: new GraphQLList(require('./implementationguideglobal.schema.js')),
description:
'A set of profiles that all resources covered by this implementation guide must conform to.',
},
_binary: {
type: require('./element.schema.js'),
description:
'A binary file that is included in the implementation guide when it is published.',
},
binary: {
type: new GraphQLList(UriScalar),
description:
'A binary file that is included in the implementation guide when it is published.',
},
page: {
type: new GraphQLNonNull(require('./implementationguidepage.schema.js')),
description:
},
_searchInclude: {
type: require('./element.schema.js'),
description: 'A list of _include values supported by the server.',
},
searchInclude: {
type: new GraphQLList(GraphQLString),
description: 'A list of _include values supported by the server.',
},
_searchRevInclude: {
type: require('./element.schema.js'),
description:
'A list of _revinclude (reverse include) values supported by the server.',
},
searchRevInclude: {
type: new GraphQLList(GraphQLString),
description:
'A list of _revinclude (reverse include) values supported by the server.',
},
searchParam: {
type: new GraphQLList(
require('./capabilitystatementrestresourcesearchparam.schema.js'),
),
description:
'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.',
},
}),
});
["blocks", () => new GraphQLList(blockType)],
["pointerImports", () => new GraphQLList(pointerImportType)],
if (!removedColor) {
throw new Error('Color not found');
}
return removedColor;
}
};
export const removeColors = {
type: new GraphQLList(colorType),
args: {
ids: {
name: 'ids',
type: new GraphQLNonNull(
new GraphQLList(GraphQLID)
)
}
},
async resolve (root, params) {
authorize(root);
const {ids} = params;
const removedColors = await ColorModel.remove({
_id: {
$in: ids
}
});
return removedColors.result.ok && ids.map(_id => ({_id})) || [];
}
};
const workspace = await Workspace.findByPkOrSerialId(id);
await loadDataForEachWorkspaceInSubtree(workspace);
return JSON.stringify(cacheForTimeSpentOnWorkspace);
},
},
},
}),
mutation: new GraphQLObjectType({
name: "RootMutationType",
fields: {
updateBlocks: {
type: new GraphQLList(blockType),
args: {
blocks: { type: new GraphQLList(BlockInput) },
experimentId: { type: GraphQLString },
},
resolve: requireUser(
"You must be logged in to update blocks",
async (_, { blocks, experimentId }, context) => {
let newBlocks: any = [];
for (const _block of blocks) {
const block = await Block.findByPk(_block.id);
if (block === null) {
continue;
}
const workspace = await Workspace.findByPk(block.workspaceId);
if (workspace == null) {
throw new Error(
type: 'object',
properties: {}
}
}
const reference = getRefProp(jsonSchema);
if (reference) {
return getExistingType(reference, isInputType);
}
if (jsonSchema.type === 'array') {
if (isObjectType(jsonSchema.items)) {
return new graphql.GraphQLList(createGQLObject(jsonSchema.items, title + '_items', isInputType));
} else {
return new graphql.GraphQLList(getGraphQLTypes(jsonSchema.items));
}
}
title = title || jsonSchema.title;
const objectType = isInputType ? 'GraphQLInputObjectType' : 'GraphQLObjectType';
return new graphql[objectType]({
name: title,
description: jsonSchema.description,
fields: getTypeFields(jsonSchema, title, isInputType)
});
}
[21, GraphQLInt],
[23, GraphQLInt],
[26, GraphQLInt],
[700, GraphQLFloat],
[701, GraphQLFloat],
[16, GraphQLBoolean],
[1082, DateType],
[1114, DateType],
[1184, DateType],
[600, PointType],
[718, CircleType],
[1000, new GraphQLList(GraphQLBoolean)],
[1005, new GraphQLList(GraphQLInt)],
[1007, new GraphQLList(GraphQLInt)],
[1028, new GraphQLList(GraphQLInt)],
[1016, new GraphQLList(BigIntType)],
[1021, new GraphQLList(GraphQLFloat)],
[1022, new GraphQLList(GraphQLFloat)],
[1231, new GraphQLList(GraphQLFloat)],
[1014, new GraphQLList(GraphQLString)],
[1015, new GraphQLList(GraphQLString)],
[1008, new GraphQLList(GraphQLString)],
[1009, new GraphQLList(GraphQLString)],
[1115, new GraphQLList(DateType)],
[1182, new GraphQLList(DateType)],
[1185, new GraphQLList(DateType)],
[1186, IntervalType],
[114, JSONType],
[3802, JSONType],
[199, new GraphQLList(JSONType)],
[3807, new GraphQLList(JSONType)],
[2951, new GraphQLList(GraphQLString)],
unique: true,
orderable: true,
filterable: true,
},
},
description: {
type: GraphQLString,
description: 'Description of the type.',
},
interfaces: {
type: new GraphQLList(GraphQLString),
description: 'The names of interfaces the type implements. ' +
'(Only "Node" is currently supported.)',
},
fields: {
type: new GraphQLList(field.type),
description: 'A list of fields for the type.',
},
permissions: {
type: new GraphQLList(permission.type),
description: 'All the object-level permissions for the type',
},
pluralName: {
type: GraphQLString,
description: 'An optional pluralized name for the type. If not ' +
'specified, the default English pluralization will be used for ' +
'field names like `allStories`.',
},
hooks: {
type: typeRegistry.getTypeSet('ReindexHook').connection,
args: createConnectionArguments('ReindexHook', typeRegistry),
resolve: createConnectionFieldResolve(