facebook/relay · error
Node is an object
Error message
Node is an object
What it means
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.
Source
Thrown at compiler/crates/schema-set/src/build_in_memory_schema.rs:817
// alphabetically so its ordering is independent of input read order (a
// flatbuffer schema is always fully sorted, and callsites moving off it
// must not see ordering churn).
let sdl = "\
directive @zed on OBJECT | FIELD_DEFINITION
directive @abc on OBJECT | FIELD_DEFINITION
interface Zeta { id: ID }
interface Alpha { id: ID }
interface Mango { id: ID }
type Node implements Zeta & Alpha & Mango @zed @abc {
id: ID
search(zebra: Int, alpha: Int, mango: Int): String @zed @abc
}
type Query { node: Node }";
let source = SourceLocationKey::standalone("app.graphql");
let schema = build_in_memory_schema(&schema_set_from(sdl, source)).unwrap();
let node_type = schema.get_type("Node".intern()).expect("Node exists");
let node = schema.object(node_type.get_object_id().expect("Node is an object"));
// Implemented interfaces resolve in alphabetical name order.
let interface_names: Vec<String> = node
.interfaces
.iter()
.map(|id| schema.interface(*id).name.item.to_string())
.collect();
assert_eq!(interface_names, vec!["Alpha", "Mango", "Zeta"]);
// Directives applied to the type are sorted by name.
let type_directives: Vec<String> =
node.directives.iter().map(|d| d.name.to_string()).collect();
assert_eq!(type_directives, vec!["abc", "zed"]);
let search = schema.field(
schema
.named_field(node_type, "search".intern())
.expect("Node.search exists"),View on GitHub (pinned to 668b1b85e0)
Solutions
- Verify Node is declared as a type (object) in the fixture
- Check object id resolution for types with multiple interfaces and directives
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at compiler/crates/schema-set/src/build_in_memory_schema.rs:817 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of facebook/relay@668b1b85e0 (2026-09-02).
Data as JSON: /api/errors/dcf5c8980024ec5b.
Report an issue: GitHub.