Skip to content

Commit

Permalink
WIP: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
fprasx committed Jan 21, 2024
1 parent 1dff406 commit 0d45c23
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 4 additions & 3 deletions trustfall_core/src/schema/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,10 @@ fn check_root_query_type_invariants(
field_type.to_string(),
));
} else if !vertex_types.contains_key(base_named_type) {
// Somehow the base named type is neither a vertex nor a scalar,
// and this field is neither an edge nor a property.
unreachable!()
errors.push(InvalidSchemaError::UnknownPropertyOrEdgeType(
field_defn.node.name.to_string(),
field_type.to_string(),
))
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
schema {
query: RootSchemaQuery
}

type RootSchemaQuery {
secret: FakeType!
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UnknownPropertyOrEdgeType("secret", "FakeType!")

0 comments on commit 0d45c23

Please sign in to comment.