Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
buildGeneratesSection: options => {
const schemaObject: GraphQLSchema = options.schemaAst ? options.schemaAst : buildASTSchema(options.schema);
const baseVisitor = new BaseVisitor(options.config, {
scalars: buildScalars(schemaObject, options.config.scalars),
});
const getAllFragmentSubTypes = (possbileTypes: string[], name: string, suffix: string): string[] => {
if (possbileTypes.length === 0) {
return [];
} else if (possbileTypes.length === 1) {
return [
baseVisitor.convertName(name, {
useTypesPrefix: true,
suffix: suffix,
}),
];
} else {
return possbileTypes.map(typeName =>
baseVisitor.convertName(name, {