Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Object.keys(fields).forEach(k => {
const names = k.split('.');
if (names.length === 1) {
result[names[0]] = fields[k];
} else {
if (!result[names[0]]) {
result[names[0]] = {
type: ObjectTypeComposer.createTemp({
name: `${this.prefix}_${upperFirst(names[0])}`,
fields: (() => {}: any),
}),
resolve: () => {
return {};
},
};
}
result[names[0]].type.setField(names[1], fields[k]);
}
});
getTypeName(): string {
return `${this.prefix}${upperFirst(this.serviceId)}${upperFirst(this.name)}`;
}
getPrefix(): string {
return `Aws${upperFirst(this.metadata.endpointPrefix)}`;
}
getTypeName(): string {
return `${this.prefix}${upperFirst(this.serviceId)}`;
}
Object.keys(param.members).forEach(fname => {
fields[fname] = this.convertParam(
param.members[fname],
`${name}${upperFirst(fname)}`,
false,
shapes
);
});
}