{"name":"relay-compiler","version":"0.0.0-main-e959f5ce","keywords":["graphql","relay"],"license":"MIT","_id":"relay-compiler@0.0.0-main-e959f5ce","maintainers":[{"name":"alunyov","email":"alunyov@fb.com"},{"name":"rbalicki","email":"robert.balicki@gmail.com"},{"name":"sugarpirate","email":"arr@sugarpirate.com"},{"name":"fb","email":"opensource+npm@fb.com"},{"name":"yuzhi","email":"yuzhi.z@gmail.com"},{"name":"kassens","email":"jkassens@fb.com"},{"name":"jstejada","email":"juans.tejada@gmail.com"},{"name":"xiaobu","email":"yaotianyu0512@gmail.com"},{"name":"lunaruan","email":"lunaris.ruan@gmail.com"},{"name":"relay-bot","email":"jkassens+relay@fb.com"},{"name":"kacieb","email":"kaciebawiec@gmail.com"}],"homepage":"https://relay.dev","bugs":{"url":"https://github.com/facebook/relay/issues"},"bin":{"relay-compiler":"cli.js"},"dist":{"shasum":"f427599636d6ffc64ee9221d909ee59e28653b8d","tarball":"http://registry-npm.ywwl.com/relay-compiler/download/relay-compiler-0.0.0-main-e959f5ce.tgz","fileCount":9,"integrity":"sha512-9g+Xd8eH9B1hj1SMZ13PzI9JADrIA7cOmTjb2KUhEugJWmp42+cR9hRcLYyTC+hB7OknaFJo5mpCIl8be3OOoQ==","signatures":[{"sig":"MEUCIQDzFt9IVGRroPBxJwE9NP2l5jxt7tP3/xdr6z9h7+mQ2AIgFfpZvSMv/h5XUfVX2vRjBcOKtaxnqSRQc52NvZhJvn8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50743541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzfXxCRA9TVsSAnZWagAAx2kP/0WBmXvmgLAv1nPxuY48\ndvaK1wQPXQyXF2OvVx4vl/KqdwvOgBwOXodEsF5UwaqMHY+W2sHo0K2VBri1\nVZ/e5QRIYRRG6druuQ4n3IKEUIx+uyjlVR2c7g5dJQx4j5xlrYduiuGCetjw\nc7kp0fjQO31k5WzmquL3fSDvi8n2pheaAQl9Ha8tty6UF3cQ5NnqFf50mdiQ\n/f9puwoyQEnzan2G2y0cdJhsa++5CWiY0IyXxYCOXpu9PAjl8NvkDAhZraBM\n6UyDdVxVEHleR9PY0DljlTXOsowSg+Fnz9fpwjqfJGee8vbDwK9XA/C0eSWz\nyrBinbXaXoQpq6ca0PrQFIP41ha/PCUupyFDueANhfzB4lUfFHL6DgfdR90f\n7Fih/bVqRLb7YPsxskNQCr5f0sHZ+VWbichLQ8p9bhNI0u5d18D6IVAH2bgA\nE49tLN90avICurWxUPS/2kDqGhfEzjAZufeoucW5jToFXmPiC4ox/tEzn8Vv\nJtVEKz851qxg2HJuCNqXz7JkXYhRC8Rfy8i95LAx4dHMJE/maKiHUr4iAsyn\nkdyCultqEUv0V9y0/AnjHy6rxBdmKT2lCXhVuRHOgGFx0zE6pegcgFOz6ZDv\niD4Q/varSyK5QBSsOpdNigMeyHY/W3eLjSz1jYYWgcpX5QXR4iksBE3qpEfC\npV9c\r\n=XiXX\r\n-----END PGP SIGNATURE-----\r\n","size":17781476,"noattachment":false,"key":"/relay-compiler/-/relay-compiler-0.0.0-main-e959f5ce.tgz"},"main":"index.js","readme":"# Relay Compiler\n\nRelay-Compiler is a code-generation toolkit for GraphQL. It contains the core\nfunctionalities of GraphQL code-gen, including file parsing, validation, syntax\ntree parsing and transformation.\n\n## Configuration in package.json\n\nThe simplest way to configure relay is to add a new `relay` section to your\n`package.json` that contains the relay config.\n\nAt minimum, the relay config must specify where to find source files (i.e. files\ncontaining `graphql` literals) and the GraphQL schema for the project.\n\n```\n// adding new section to package json\n{\n  ...\n \"scripts\": {\n    \"relay\": \"relay-compiler\"\n },\n ...\n // relay configuration\n \"relay\": {\n    \"src\": \"./src\",\n    \"schema\": \"./src/schema/app_schema.graphql\"\n  }\n}\n```\nRelay Compiler will automatically discover the config if:\n\n- There is a `relay.config.json`, `relay.config.js` file at the root of the\nproject (i.e. in the same folder as the `package.json` file).\n- The `package.json` file contains a `\"relay\"` key.\n\nAdditionally, this config file can be specified with the CLI argument `--config`\nas follows:\n\n```shell\nnpm run relay --config ./relay.json\n```\n\nor with yarn\n\n```shell\nyarn relay --config ./relay.json\n```\n\nPlease note, that if you pass configuration options via --cli arguments, you'll\nneed to provide a separate configuration for the [babel plugin](https://www.npmjs.com/package/babel-plugin-relay).\n\n## File Finder\nRelay compiler uses [`watchman`](https://facebook.github.io/watchman/) to find\nfile sources, and \"listen\" to the file  changes in the \"watch\" mode.\nIf `watchman` is not available, the compiler will\nuse [glob](https://docs.rs/glob/latest/glob/) to query the filesystem for files.\n\n## Configuration\n\n### Supported compiler configuration options\n\n- `src`                 Root directory of application code.  [string] [required]\n- `schema`              Relative path to the file with GraphQL SDL file.\n                                                             [string] [required]\n- `artifactDirectory`   A specific directory to output all artifacts to. When\n                        enabling this the babel plugin needs `artifactDirectory`\n                        to be set as well.                              [string]\n- `language`            The name of the language used for input files and\n                        generated artifacts.\n                                       [\"flow\" | \"typescript\"] [default: \"flow\"]\n- `excludes`            Directories to ignore under `src`.     [array] [default:\n               [\"**/node_modules/**\", \"**/__mocks__/**\", \"**/__generated__/**\"]]\n- `schemaExtensions`    List of directories with schema extensions.      [array]\n- `noFutureProofEnums`  For `flow` only. This option controls whether or not\n                        a catch-all entry is added to enum type definitions\n                        values that may be added in the future. Enabling this\n                        means you will have to update your application whenever\n                        the GraphQL server schema adds new enum values to\n                        prevent it from breaking.      [boolean][default: false]\n- `customScalars`       Mappings from custom scalars in your schema to built-in\n                        GraphQL types, for type emission purposes.      [object]\n- `eagerEsModules`      This option enables emitting ES modules artifacts.\n                                                       [boolean][default: false]\n- `persistConfig`\n  - `url`               String, URL to send a POST request to to persist.\n                                                                        [string]\n  - `params`            The document will be in a `POST`\n                        parameter `text`. This map can contain additional\n                        parameters to send.                             [object]\n- `codegenCommand`      Command name that for relay compiler.           [string]\n\n- `isDevVariableName`   Name of the global variable for dev mode (`__DEV__`).\n                                                                        [string]\n- `jsModuleFormat`      Formatting style for generated files. `commonjs`\n                        or `haste`. Default is `commonjs`.\n                                                                        [string]\n\n\n### CLI configuration\n\nWe also support a limited set of CLI arguments that should cover the most cases\nwhen you need to run the compiler.\n\n- `--src`               Relative path to the source code.\n- `--schema`            Relative path to schema file.\n- `--artifactDirectory` Compiler output directory.\n- `--watch`             Run compiler in `watch` mode\n(requires [`watchman`](https://facebook.github.io/watchman/) to be installed).\n","_npmUser":{"name":"relay-bot","email":"jkassens+relay@fb.com"},"repository":{"url":"git+https://github.com/facebook/relay.git","type":"git"},"_npmVersion":"6.14.15","description":"A compiler tool for building GraphQL-driven applications.","directories":{},"_nodeVersion":"14.18.2","_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/relay-compiler_0.0.0-main-e959f5ce_1640887793061_0.9900187642172091","host":"s3://npm-registry-packages"},"publish_time":1640887793519,"_cnpm_publish_time":1640887793519,"dist-tags":{"dev":"13.0.0-rc.2","latest":"21.0.1","main":"0.0.0-main-b9e1c520"}}