Skip to content

Commit d9628ba

Browse files
captbaritonemeta-codesync[bot]
authored andcommitted
Update Relay Config Documentation Clarity
Reviewed By: nijiaju Differential Revision: D90402329 fbshipit-source-id: 9236f06d98e5b4ce46beaacf6bb4dcd827cc7e88
1 parent 13e88d1 commit d9628ba

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

compiler/crates/relay-compiler/relay-compiler-config-schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@
306306
]
307307
},
308308
"ConnectionInterface": {
309-
"description": "Configuration where Relay should expect some fields in the schema.",
309+
"description": "Configuration where Relay should expect some fields in the schema.\n\n**Important**: When you configure this option in the compiler, you must also configure\nthe Relay runtime to match by calling `ConnectionInterface.inject()` with the same values.\nSee: <https://relay.dev/docs/api-reference/runtime-config/#connectioninterface>",
310310
"type": "object",
311311
"properties": {
312312
"cursor": {
@@ -1250,6 +1250,7 @@
12501250
"type": "object",
12511251
"properties": {
12521252
"connectionInterface": {
1253+
"description": "Configuration for connection field names in the schema.\n\n**Important**: When you configure this option in the compiler, you must also configure\nthe Relay runtime to match by calling `ConnectionInterface.inject()` with the same values.\nSee: <https://relay.dev/docs/api-reference/runtime-config/#connectioninterface>",
12531254
"$ref": "#/$defs/ConnectionInterface",
12541255
"default": {
12551256
"cursor": "cursor",

compiler/crates/relay-config/src/connection_interface.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ use serde::Deserialize;
1212
use serde::Serialize;
1313

1414
/// Configuration where Relay should expect some fields in the schema.
15+
///
16+
/// **Important**: When you configure this option in the compiler, you must also configure
17+
/// the Relay runtime to match by calling `ConnectionInterface.inject()` with the same values.
18+
/// See: <https://relay.dev/docs/api-reference/runtime-config/#connectioninterface>
1519
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
1620
#[serde(deny_unknown_fields, rename_all = "camelCase")]
1721
pub struct ConnectionInterface {

compiler/crates/relay-config/src/project_config.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,11 @@ impl Debug for ExtraArtifactsConfig {
193193
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
194194
#[serde(rename_all = "camelCase")]
195195
pub struct SchemaConfig {
196+
/// Configuration for connection field names in the schema.
197+
///
198+
/// **Important**: When you configure this option in the compiler, you must also configure
199+
/// the Relay runtime to match by calling `ConnectionInterface.inject()` with the same values.
200+
/// See: <https://relay.dev/docs/api-reference/runtime-config/#connectioninterface>
196201
#[serde(default)]
197202
pub connection_interface: ConnectionInterface,
198203

0 commit comments

Comments
 (0)