Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(pluginConfig: FlowResolversPluginConfig, schema: GraphQLSchema) {
super(pluginConfig, null, schema);
autoBind(this);
this.setVariablesTransformer(new FlowOperationVariablesToObject(this.scalars, this.convertName));
}
convertName: this.convertName.bind(this),
enumPrefix: this.config.enumPrefix,
scalars: this.scalars,
formatNamedField: (name: string): string => name,
wrapTypeWithModifiers,
};
const processor = config.preResolveTypes
? new PreResolveTypesProcessor(processorConfig)
: new FlowWithPickSelectionSetProcessor({
...processorConfig,
useFlowExactObjects: this.config.useFlowExactObjects,
useFlowReadOnlyTypes: this.config.useFlowReadOnlyTypes,
});
const enumsNames = Object.keys(schema.getTypeMap()).filter(typeName => isEnumType(schema.getType(typeName)));
this.setSelectionSetHandler(new SelectionSetToObject(processor, this.scalars, this.schema, this.convertName.bind(this), allFragments, this.config));
this.setVariablesTransformer(new FlowOperationVariablesToObject(this.scalars, this.convertName.bind(this), this.config.namespacedImportName, enumsNames, this.config.enumPrefix));
}
}