From 6e4c120aa2b28b165166e36f6b800263f0af4f6f Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Tue, 8 Oct 2024 16:29:29 -0700 Subject: [PATCH] Update error message for clarity Reviewed By: tyao1 Differential Revision: D63924043 fbshipit-source-id: 9d5fd9a4231cbd56c1b4b0f1fc6842d4bda9a3b2 --- compiler/crates/relay-schema-generation/src/errors.rs | 2 +- .../tests/docblock/fixtures/multiple-modules.expected | 2 +- .../docblock/fixtures/return-aliased-weak-object.todo.expected | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/crates/relay-schema-generation/src/errors.rs b/compiler/crates/relay-schema-generation/src/errors.rs index 8e3b78c240703..7e98c02ee4611 100644 --- a/compiler/crates/relay-schema-generation/src/errors.rs +++ b/compiler/crates/relay-schema-generation/src/errors.rs @@ -47,7 +47,7 @@ pub enum SchemaGenerationError { )] UseNamedOrDefaultImport, #[error( - "Failed to find type definition for `{entity_name}` using a {export_type} import from module `{module_name}`. Please make sure `{entity_name}` is imported using a named or default import and that it is a resolver type" + "Failed to find @RelayResolver type definition for `{entity_name}` using a {export_type} import from module `{module_name}`. Please make sure `{entity_name}` is either defined locally or imported using a named or default import and that it is a resolver type" )] ModuleNotFound { entity_name: StringKey, diff --git a/compiler/crates/relay-schema-generation/tests/docblock/fixtures/multiple-modules.expected b/compiler/crates/relay-schema-generation/tests/docblock/fixtures/multiple-modules.expected index 1704e51103b85..2e181d6820f36 100644 --- a/compiler/crates/relay-schema-generation/tests/docblock/fixtures/multiple-modules.expected +++ b/compiler/crates/relay-schema-generation/tests/docblock/fixtures/multiple-modules.expected @@ -70,7 +70,7 @@ export function name(dog: DogFlowType): ?string { 6 │ return 5; -✖︎ Failed to find type definition for `DogFlowType` using a default import from module `Dog.flow`. Please make sure `DogFlowType` is imported using a named or default import and that it is a resolver type +✖︎ Failed to find @RelayResolver type definition for `DogFlowType` using a default import from module `Dog.flow`. Please make sure `DogFlowType` is either defined locally or imported using a named or default import and that it is a resolver type Dog-name.js:7:27 6 │ */ diff --git a/compiler/crates/relay-schema-generation/tests/docblock/fixtures/return-aliased-weak-object.todo.expected b/compiler/crates/relay-schema-generation/tests/docblock/fixtures/return-aliased-weak-object.todo.expected index b812362e691f8..e326df39374f4 100644 --- a/compiler/crates/relay-schema-generation/tests/docblock/fixtures/return-aliased-weak-object.todo.expected +++ b/compiler/crates/relay-schema-generation/tests/docblock/fixtures/return-aliased-weak-object.todo.expected @@ -31,7 +31,7 @@ export function fullName(cat: CatFlowType): ?FullName { ==================================== OUTPUT =================================== -✖︎ Failed to find type definition for `FullName` using a FullName import from module `module`. Please make sure `FullName` is imported using a named or default import and that it is a resolver type +✖︎ Failed to find @RelayResolver type definition for `FullName` using a FullName import from module `module`. Please make sure `FullName` is either defined locally or imported using a named or default import and that it is a resolver type module.js:26:46 25 │ */