diff --git a/compiler/crates/relay-typegen/src/rescript.rs b/compiler/crates/relay-typegen/src/rescript.rs index 6207a413f2432..add9d27894540 100644 --- a/compiler/crates/relay-typegen/src/rescript.rs +++ b/compiler/crates/relay-typegen/src/rescript.rs @@ -559,9 +559,9 @@ fn get_object_props( }) } _ => { - if key.as_str().starts_with("$") { + if key.as_str().starts_with("$") || key.as_str().starts_with("__relay_") { // Internal Relay types typically come prefixed with - // "&". Ignore those unless we have an explicit + // "&" or "__relay_". Ignore those unless we have an explicit // strategy to handle them. debug!("Internal prop found: {}", key); None diff --git a/compiler/test-project-res/src/__generated__/UserMeta____relay_model_instance_graphql.res b/compiler/test-project-res/src/__generated__/UserMeta____relay_model_instance_graphql.res index 6e895d658651e..b0eb0bd3a1d38 100644 --- a/compiler/test-project-res/src/__generated__/UserMeta____relay_model_instance_graphql.res +++ b/compiler/test-project-res/src/__generated__/UserMeta____relay_model_instance_graphql.res @@ -4,9 +4,7 @@ module Types = { @@warning("-30") - type fragment = { - __relay_model_instance: UserMeta.t, - } + type fragment = unit } module Internal = { @@ -14,12 +12,10 @@ module Internal = { type fragmentRaw @live let fragmentConverter: Js.Dict.t>> = %raw( - json`{"__root":{"__relay_model_instance":{"c":"UserMeta"}}}` + json`{}` ) @live - let fragmentConverterMap = { - "UserMeta": UserMeta.parse, - } + let fragmentConverterMap = () @live let convertFragment = v => v->RescriptRelay.convertObj( fragmentConverter,