{"record":{"id":"7d0d6b3ed68da27b","repo":"facebook/relay","slug":"a-schema-in-the-project-root-directory-is-currentl","errorCode":null,"errorMessage":"A schema in the project root directory is currently not supported.","messagePattern":"A schema in the project root directory is currently not supported\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"compiler/crates/relay-compiler/src/config.rs","lineNumber":1050,"sourceCode":"    }\n\n    /// Returns all GraphQL schema directories for the config.\n    pub fn get_schema_dir_paths(&self) -> Vec<PathBuf> {\n        self.projects\n            .values()\n            .filter_map(|project_config| match &project_config.schema_location {\n                SchemaLocation::File(_) | SchemaLocation::CompactFile(_) => None,\n                SchemaLocation::Directory(schema_dir) => Some(schema_dir.clone()),\n            })\n            .collect()\n    }\n\n    /// Returns root directories that contain GraphQL schema files.\n    pub fn get_schema_file_roots(&self) -> impl Iterator<Item = PathBuf> + use<> {\n        self.get_schema_file_paths().into_iter().map(|schema_path| {\n            schema_path\n                .parent()\n                .expect(\"A schema in the project root directory is currently not supported.\")\n                .to_owned()\n        })\n    }\n}\n\nfn feature_flags_for_project(\n    project_feature_flags: Option<FeatureFlags>,\n    global_feature_flags: &FeatureFlags,\n    is_multi_project: bool,\n) -> FeatureFlags {\n    let mut feature_flags = project_feature_flags.unwrap_or_else(|| global_feature_flags.clone());\n    if is_multi_project {\n        feature_flags.disable_deduping_common_structures_in_raw_response_types =\n            global_feature_flags\n                .disable_deduping_common_structures_in_raw_response_types\n                .clone();\n    }\n    feature_flags","sourceCodeStart":1032,"sourceCodeEnd":1068,"githubUrl":"https://github.com/facebook/relay/blob/668b1b85e06261aa3b58dabfc51f8b5524a70955/compiler/crates/relay-compiler/src/config.rs#L1032-L1068","documentation":"Validation failure in the compiler config: a project is configured to load its schema from a directory, and that schema directory resolves to the project root itself. Scanning the project root for schema files is unsupported (it would sweep in all source documents), so configuration parsing rejects this layout.","triggerScenarios":"Thrown at compiler/crates/relay-compiler/src/config.rs:1050 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Move schema files into a dedicated subdirectory and point the schema directory config at it","Alternatively use a single schema file (schema.path) or a generated compact schema instead of a directory","Restructure so the project root is not the schema directory"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"668b1b85e06261aa3b58dabfc51f8b5524a70955","analyzedAt":"2026-09-02T19:57:20.783Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}