{"record":{"id":"dcf5c8980024ec5b","repo":"facebook/relay","slug":"node-is-an-object","errorCode":null,"errorMessage":"Node is an object","messagePattern":"Node is an object","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"compiler/crates/schema-set/src/build_in_memory_schema.rs","lineNumber":817,"sourceCode":"        // alphabetically so its ordering is independent of input read order (a\n        // flatbuffer schema is always fully sorted, and callsites moving off it\n        // must not see ordering churn).\n        let sdl = \"\\\ndirective @zed on OBJECT | FIELD_DEFINITION\ndirective @abc on OBJECT | FIELD_DEFINITION\ninterface Zeta { id: ID }\ninterface Alpha { id: ID }\ninterface Mango { id: ID }\ntype Node implements Zeta & Alpha & Mango @zed @abc {\n  id: ID\n  search(zebra: Int, alpha: Int, mango: Int): String @zed @abc\n}\ntype Query { node: Node }\";\n        let source = SourceLocationKey::standalone(\"app.graphql\");\n        let schema = build_in_memory_schema(&schema_set_from(sdl, source)).unwrap();\n\n        let node_type = schema.get_type(\"Node\".intern()).expect(\"Node exists\");\n        let node = schema.object(node_type.get_object_id().expect(\"Node is an object\"));\n\n        // Implemented interfaces resolve in alphabetical name order.\n        let interface_names: Vec<String> = node\n            .interfaces\n            .iter()\n            .map(|id| schema.interface(*id).name.item.to_string())\n            .collect();\n        assert_eq!(interface_names, vec![\"Alpha\", \"Mango\", \"Zeta\"]);\n\n        // Directives applied to the type are sorted by name.\n        let type_directives: Vec<String> =\n            node.directives.iter().map(|d| d.name.to_string()).collect();\n        assert_eq!(type_directives, vec![\"abc\", \"zed\"]);\n\n        let search = schema.field(\n            schema\n                .named_field(node_type, \"search\".intern())\n                .expect(\"Node.search exists\"),","sourceCodeStart":799,"sourceCodeEnd":835,"githubUrl":"https://github.com/facebook/relay/blob/668b1b85e06261aa3b58dabfc51f8b5524a70955/compiler/crates/schema-set/src/build_in_memory_schema.rs#L799-L835","documentation":"Test assertion in sorts_arguments_interfaces_and_directives_alphabetically: Node's get_object_id must succeed, confirming Node is an object type. Firing means Node resolved to a different kind or its object id lookup failed during the in-memory build with directives and interfaces present.","triggerScenarios":"Thrown at compiler/crates/schema-set/src/build_in_memory_schema.rs:817 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify Node is declared as a type (object) in the fixture","Check object id resolution for types with multiple interfaces and directives"],"exampleFix":null,"handlingStrategy":"type-guard","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"}