relay-compiler 0.0.0-main-3328e8dd → 0.0.0-main-edd32144

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -27,10 +27,11 @@ containing `graphql` literals) and the GraphQL schema for the project.
27
27
  }
28
28
  }
29
29
  ```
30
+
30
31
  Relay Compiler will automatically discover the config if:
31
32
 
32
33
  - There is a `relay.config.json`, `relay.config.js` file at the root of the
33
- project (i.e. in the same folder as the `package.json` file).
34
+ project (i.e. in the same folder as the `package.json` file).
34
35
  - The `package.json` file contains a `"relay"` key.
35
36
 
36
37
  Additionally, this config file can be specified with the CLI argument `--config`
@@ -47,71 +48,69 @@ yarn relay --config ./relay.json
47
48
  ```
48
49
 
49
50
  Please note, that if you pass configuration options via --cli arguments, you'll
50
- need to provide a separate configuration for the [babel plugin](https://www.npmjs.com/package/babel-plugin-relay).
51
+ need to provide a separate configuration for the
52
+ [babel plugin](https://www.npmjs.com/package/babel-plugin-relay).
51
53
 
52
54
  ## File Finder
55
+
53
56
  Relay compiler uses [`watchman`](https://facebook.github.io/watchman/) to find
54
- file sources, and "listen" to the file changes in the "watch" mode.
55
- If `watchman` is not available, the compiler will
56
- use [glob](https://docs.rs/glob/latest/glob/) to query the filesystem for files.
57
+ file sources, and "listen" to the file changes in the "watch" mode. If
58
+ `watchman` is not available, the compiler will use
59
+ [glob](https://docs.rs/glob/latest/glob/) to query the filesystem for files.
57
60
 
58
61
  ## Configuration
59
62
 
60
63
  ### Supported compiler configuration options
61
64
 
62
- - `src` Root directory of application code. [string] [required]
63
- - `schema` Relative path to the file with GraphQL SDL file.
64
- [string] [required]
65
- - `artifactDirectory` A specific directory to output all artifacts to. When
66
- enabling this the babel plugin needs `artifactDirectory`
67
- to be set as well. [string]
68
- - `language` The name of the language used for input files and
69
- generated artifacts.
70
- ["flow" | "typescript"] [default: "flow"]
71
- - `excludes` Directories to ignore under `src`. [array] [default:
72
- ["**/node_modules/**", "**/__mocks__/**", "**/__generated__/**"]]
73
- - `schemaExtensions` List of directories with schema extensions. [array]
74
- - `noFutureProofEnums` For `flow` only. This option controls whether or not
75
- a catch-all entry is added to enum type definitions
76
- values that may be added in the future. Enabling this
77
- means you will have to update your application whenever
78
- the GraphQL server schema adds new enum values to
79
- prevent it from breaking. [boolean][default: false]
80
- - `customScalars` Mappings from custom scalars in your schema to built-in
81
- GraphQL types, for type emission purposes. [object]
82
- - `eagerEsModules` This option enables emitting ES modules artifacts.
83
- [boolean][default: false]
65
+ - `src` Root directory of application code. [string] [required]
66
+ - `schema` Relative path to the file with GraphQL SDL file. [string] [required]
67
+ - `schemaConfig`
68
+ - `nodeInterfaceIdField` Configure the name of the globally unique ID field on
69
+ the Node interface. Useful if you can't use the default `id` field name.
70
+ [string][default: "id"]
71
+ - `artifactDirectory` A specific directory to output all artifacts to. When
72
+ enabling this the babel plugin needs `artifactDirectory` to be set as well.
73
+ [string]
74
+ - `language` The name of the language used for input files and generated
75
+ artifacts. ["flow" | "typescript"] [default: "flow"]
76
+ - `excludes` Directories to ignore under `src`. [array] [default:
77
+ ["**/node_modules/**", "**/__mocks__/**", "**/__generated__/**"]]
78
+ - `schemaExtensions` List of directories with schema extensions. [array]
79
+ - `noFutureProofEnums` For `flow` only. This option controls whether or not a
80
+ catch-all entry is added to enum type definitions values that may be added in
81
+ the future. Enabling this means you will have to update your application
82
+ whenever the GraphQL server schema adds new enum values to prevent it from
83
+ breaking. [boolean][default: false]
84
+ - `customScalars` Mappings from custom scalars in your schema to built-in
85
+ GraphQL types, for type emission purposes. [object]
86
+ - `eagerEsModules` This option enables emitting ES modules artifacts.
87
+ [boolean][default: false]
84
88
  - `persistConfig`
85
- - `url` String, URL to send a POST request to to persist. This
86
- field is required in `persistConfig`
87
- [string]
88
- - `params` The document will be in a `POST` parameter `text`.
89
- This map can contain additional parameters to send.
90
- [object]
91
- - `concurrency` The maximum number concurrent requests that will
92
- be made to `url`. Use a value greater than 0.
93
- [number]
94
- - `codegenCommand` Command name that for relay compiler. [string]
95
-
96
- - `isDevVariableName` Name of the global variable for dev mode (`__DEV__`).
97
- [string]
98
- - `jsModuleFormat` Formatting style for generated files. `commonjs`
99
- or `haste`. Default is `commonjs`.
100
- [string]
101
-
89
+ - `url` String, URL to send a POST request to to persist. This field is
90
+ required in `persistConfig` [string]
91
+ - `params` The document will be in a `POST` parameter `text`. This map can
92
+ contain additional parameters to send. [object]
93
+ - `concurrency` The maximum number concurrent requests that will be made to
94
+ `url`. Use a value greater than 0. [number]
95
+ - `codegenCommand` Command name that for relay compiler. [string]
96
+
97
+ - `isDevVariableName` Name of the global variable for dev mode (`__DEV__`).
98
+ [string]
99
+ - `jsModuleFormat` Formatting style for generated files. `commonjs` or `haste`.
100
+ Default is `commonjs`. [string]
102
101
 
103
102
  ### CLI configuration
104
103
 
105
104
  We also support a limited set of CLI arguments that should cover the most cases
106
105
  when you need to run the compiler.
107
106
 
108
- - `--src` Relative path to the source code.
109
- - `--schema` Relative path to schema file.
107
+ - `--src` Relative path to the source code.
108
+ - `--schema` Relative path to schema file.
110
109
  - `--artifactDirectory` Compiler output directory.
111
- - `--repersist` Run the persister even if the query has not changed.
112
- - `--watch` Run compiler in `watch` mode.
113
- Requires
114
- [`watchman`](https://facebook.github.io/watchman/) to be installed.
115
- - `--output` Output format of the compiler. Supported options:
116
- `debug` | `verbose` | `quiet` | `quietWithErrors`.
117
- The default value is `verbose`.
110
+ - `--repersist` Run the persister even if the query has not changed.
111
+ - `--watch` Run compiler in `watch` mode. Requires
112
+ [`watchman`](https://facebook.github.io/watchman/) to be installed.
113
+ - `--output` Output format of the compiler. Supported options: `debug` |
114
+ `verbose` | `quiet` | `quietWithErrors`. The default value is `verbose`.
115
+ - `--validate` Looks for pending changes and exits with non-zero code instead of
116
+ writing to disk.
package/linux-x64/relay CHANGED
Binary file
package/macos-arm64/relay CHANGED
Binary file
package/macos-x64/relay CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "relay-compiler",
3
3
  "description": "A compiler tool for building GraphQL-driven applications.",
4
- "version": "0.0.0-main-3328e8dd",
4
+ "version": "0.0.0-main-edd32144",
5
5
  "keywords": [
6
6
  "graphql",
7
7
  "relay"
package/win-x64/relay.exe CHANGED
Binary file