{"size": 703, "ext": "js", "max_stars_repo_path": "node-compiler/src/index.js", "max_stars_repo_name": "scala-steward/scala-relay", "max_stars_repo_stars_event_min_datetime": "2017-05-02T15:39:51.000Z", "max_stars_repo_stars_event_max_datetime": "2018-02-15T05:47:11.000Z", "max_issues_repo_path": "node-compiler/src/index.js", "max_issues_repo_name": "dispalt/relay-modern-helper", "max_issues_repo_issues_event_min_datetime": "2021-01-11T07:16:43.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-29T05:51:53.000Z", "max_forks_repo_path": "node-compiler/src/index.js", "max_forks_repo_name": "goodcover/scala-relay", "max_forks_repo_forks_event_min_datetime": "2019-07-21T18:04:02.000Z", "max_forks_repo_forks_event_max_datetime": "2019-07-21T18:04:02.000Z"}
{"max_stars_count": 8, "max_issues_count": 23, "max_forks_count": 1, "avg_line_length": 27.0384615385, "max_line_length": 113, "alphanum_fraction": 0.733997155}
/**
 * @flow
 */


const find = require("./FindGraphQLTags").find;
const formatGeneratedModule = require("./codegen/formatScalaModule");
const typeGen = require("./core/ScalaGenDirect");
const fileFilter = require("./core/SjsFileFilter").fileFilter;

// Look at the interface here,
// https://github.com/facebook/relay/blob/master/packages/relay-compiler/language/RelayLanguagePluginInterface.js
function plugin() {
  return {
    inputExtensions: ["scala", "gql"],
    outputExtension: "scala",
    findGraphQLTags: find,
    formatModule: formatGeneratedModule,
    typeGenerator: typeGen,
    schemaExtensions: typeGen.schemaExtensions,
    getFileFilter: fileFilter,
  };
}

module.exports = plugin
