{"name":"relay-compiler","version":"0.0.0-main-e73b95f5","keywords":["graphql","relay"],"license":"MIT","_id":"relay-compiler@0.0.0-main-e73b95f5","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":"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":"d73d562e497099bd3a31bd4363565061bed95f55","tarball":"http://registry-npm.ywwl.com/relay-compiler/download/relay-compiler-0.0.0-main-e73b95f5.tgz","fileCount":11,"integrity":"sha512-ybJkvhRenHJea2npMSuFg6/2sa9Nmlq+mtT9azd+jI1dxWhaq5Y71TCYkb94dv9GC6LlPeJuNNHH8YGk1YhJow==","signatures":[{"sig":"MEUCIQDY8zAP0XaSCnNkIuZKbzyJ+lC1iHGJZGEl9TUmiGwMdAIgR/qnFjColwH51Ks00QTSR8WiPQgKOSCEXzllDE4S9ho=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":92283429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiataDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoALQ//ZPMNNGlf62mTaXXcSNIW3bm8oFnXi8JEUhF831KhCIiqk0iT\r\nk4JtbPkpL1N0klgnN/m8XzxmJhcDR16xlYyfAhVM6quszL5wfOHZTrgMny1O\r\nFPznrcUVCYVtXw7xuX6/9dFi92mSsiSqJIpG1c/KHhGmFkOVF3PmWnZFAUo+\r\nOXIO3lmlUit0oLfK69N001YrvygXhlxA8uX1fgyGUqM9bOTMPTpomtvfeA76\r\nd9Su0am+Pm8JIT2/wjbyLLu9JvoFVMxun5pMmvOqEiYgapFrDcK9NFLUyEIL\r\nqY5sG9WSoBaN3bTDpE3kM58/3c9P3yohad2CzqYlD+gFnH9s1dC3EzEX0K1w\r\n89Q08P/Iopf+1GNaAdrk3QfgHcO0GgcFrMsGvMbrkMX88VIsjpXf5nXArMuH\r\nCsv0vAEIXaFsf29D6v8xE5y4r4LeEudGK626l6S1IHI511nx+QgGRjskwypN\r\ny8lWFcXRLMojjwXOS0H72w04YrvmoC2HHOSIWa01+RzRjF0Omjfljox3OGcl\r\nYiAR2Km3cUC1KICwgAyBZdGAWJ6ZOa1/i7OFWBZBL9yTZjLqgEOy1889efNs\r\nbeWr3ONC5I63P86oCGi0m2yMINQ0aLfsv0kSEau6TVMZzBNhED+oVIs3f0iH\r\naYXBhfvFJXIY4BEAg/XGcXs0uT+KAmy5d4k=\r\n=ypZw\r\n-----END PGP SIGNATURE-----\r\n","size":32276710,"noattachment":false,"key":"/relay-compiler/-/relay-compiler-0.0.0-main-e73b95f5.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```\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\n  project (i.e. in the same folder as the `package.json` file).\n- The `package.json` file contains a `\"relay\"` key.\n\nAlternatively, the path to a configuration file can be specified as an argument:\n\n```shell\nnpm run relay ./relay.json\n```\n\nor with yarn\n\n```shell\nyarn relay ./relay.json\n```\n\nPlease note, in this case you'll need to provide a separate configuration for\nthe [babel plugin](https://www.npmjs.com/package/babel-plugin-relay).\n\n## File Finder\n\nRelay compiler uses [`watchman`](https://facebook.github.io/watchman/) to find\nfile sources, and \"listen\" to the file changes in the \"watch\" mode. If\n`watchman` is not available, the compiler will use\n[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. [string] [required]\n- `language` The name of the language used for input files and generated\n  artifacts. [\"javascript\" | \"typescript\" | \"flow\"] [required].\n- `artifactDirectory` A specific directory to output all artifacts to. When\n  enabling this the babel plugin needs `artifactDirectory` to be set as well.\n  [string]\n- `excludes` Directories to ignore under `src`. [array] [default:\n  [\"**/node_modules/**\", \"**/__mocks__/**\", \"**/__generated__/**\"]]\n- `schemaExtensions` List of directories with schema extensions. [array]\n- `schemaConfig`\n  - `nodeInterfaceIdField` Configure the name of the globally unique ID field on\n    the Node interface. Useful if you can't use the default `id` field name.\n    [string][default: \"id\"]\n- `noFutureProofEnums` For `flow` only. This option controls whether or not a\n  catch-all entry is added to enum type definitions values that may be added in\n  the future. Enabling this means you will have to update your application\n  whenever the GraphQL server schema adds new enum values to prevent it from\n  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` Relay supports two versions of the config:\n- - **Remote Persisting:**\n\n  - `url` String, URL to send a POST request to to persist. This field is\n    required in `persistConfig` [string]\n  - `params` The document will be in a `POST` parameter `text`. This map can\n    contain additional parameters to send. [object]\n  - `concurrency` The maximum number concurrent requests that will be made to\n    `url`. Use a value greater than 0. [number]\n\n- - **Local Persisting:**\n  - `file` Path for the JSON file that will contain operations map. Compiler\n    will write queries in the format: { \"md5(queryText) => \"queryText\", ...}.\n    [string]\n\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` or `haste`.\n  Default is `commonjs`. [string]\n\n### CLI Arguments\n\n- `--repersist` Run the persister even if the query has not changed.\n- `--watch` Run compiler in `watch` mode. Requires\n  [`watchman`](https://facebook.github.io/watchman/) to be installed.\n- `--output` Output format of the compiler. Supported options: `debug` |\n  `verbose` | `quiet` | `quietWithErrors`. The default value is `verbose`.\n- `--validate` Looks for pending changes and exits with non-zero code instead of\n  writing to disk.\n","_npmUser":{"name":"relay-bot","email":"jkassens+relay@fb.com"},"repository":{"url":"git+https://github.com/facebook/relay.git","type":"git","directory":"packages/relay-compiler"},"_npmVersion":"6.14.16","description":"A compiler tool for building GraphQL-driven applications.","directories":{},"_nodeVersion":"14.19.1","_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/relay-compiler_0.0.0-main-e73b95f5_1651168898545_0.06882092838778542","host":"s3://npm-registry-packages"},"publish_time":1651168899117,"_cnpm_publish_time":1651168899117,"dist-tags":{"dev":"13.0.0-rc.2","latest":"21.0.1","main":"0.0.0-main-b9e1c520"}}