Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private generateModelXConnectionType(ctx: TransformerContext, typeDef: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode): void {
const tableXConnectionName = ModelResourceIDs.ModelConnectionTypeName(typeDef.name.value)
if (this.typeExist(tableXConnectionName, ctx)) {
return
}
// Create the ModelXConnection
const connectionType = blankObject(tableXConnectionName)
ctx.addObject(connectionType)
ctx.addObjectExtension(makeModelConnectionType(typeDef.name.value))
}
private generateSearchableXConnectionType(ctx: TransformerContext, def: ObjectTypeDefinitionNode): void {
const searchableXConnectionName = `Searchable${def.name.value}Connection`;
if (this.typeExist(searchableXConnectionName, ctx)) {
return;
}
// Create the TableXConnection
const connectionType = blankObject(searchableXConnectionName);
ctx.addObject(connectionType);
// Create TableXConnection type with items and nextToken
let connectionTypeExtension = blankObjectExtension(searchableXConnectionName);
connectionTypeExtension = extensionWithFields(connectionTypeExtension, [
makeField('items', [], makeListType(makeNamedType(def.name.value))),
]);
connectionTypeExtension = extensionWithFields(connectionTypeExtension, [
makeField('nextToken', [], makeNamedType('String')),
makeField('total', [], makeNamedType('Int')),
]);
ctx.addObjectExtension(connectionTypeExtension);
}
private generateModelXConnectionType(ctx: TransformerContext, typeDef: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode): void {
const tableXConnectionName = ModelResourceIDs.ModelConnectionTypeName(typeDef.name.value)
if (this.typeExist(tableXConnectionName, ctx)) {
return
}
// Create the ModelXConnection
const connectionType = blankObject(tableXConnectionName)
ctx.addObject(connectionType)
ctx.addObjectExtension(makeModelConnectionType(typeDef.name.value))
}
private generateModelXConnectionType(ctx: TransformerContext, def: ObjectTypeDefinitionNode): void {
const tableXConnectionName = ModelResourceIDs.ModelConnectionTypeName(def.name.value)
if (this.typeExist(tableXConnectionName, ctx)) {
return
}
// Create the ModelXConnection
const connectionType = blankObject(tableXConnectionName)
ctx.addObject(connectionType)
ctx.addObjectExtension(makeModelConnectionType(def.name.value))
}
AppSyncDynamoDBTransformer.prototype.generateModelXConnectionType = function (ctx, def) {
var tableXConnectionName = definitions_1.makeModelConnectionTypeName(def.name.value);
if (this.typeExist(tableXConnectionName, ctx)) {
return;
}
// Create the ModelXConnection
var connectionType = graphql_transformer_common_1.blankObject(tableXConnectionName);
ctx.addObject(connectionType);
ctx.addObjectExtension(definitions_1.makeModelConnectionType(def.name.value));
};
AppSyncDynamoDBTransformer.prototype.generateFilterInputs = function (ctx, def) {