You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/relationship_resolver.rb
+18-2Lines changed: 18 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -36,8 +36,12 @@ def resolve
36
36
end
37
37
38
38
[nil,"#{relationship_error_prefix}#{issue}"]
39
-
elsif !related_type.root_document_type?
40
-
[nil,"#{relationship_error_prefix} references a type which is not a root document type: `#{related_type.name}`. Only root document types can be used in relations."]
Copy file name to clipboardExpand all lines: elasticgraph-schema_definition/spec/unit/elastic_graph/schema_definition/runtime_metadata/object_types_by_name/update_targets_spec.rb
it"raises an error if the related type exists but is a non-indexed object type, regardless of whether there are any `sourced_from` fields or not"do
735
+
it"raises an error if the related type exists but is a non-indexed object type on a GraphQL-exposed relationship, regardless of whether there are any `sourced_from` fields or not"do
it"raises an error if a non-indexed related type lacks an `id` field, since relationships join on `id` and non-indexed types skip the `id` validation `t.index` performs"do
"references `WidgetWorkspace`, which lacks an `id` field. Related types must define an `id` field since relationships join on it."
798
+
)
799
+
end
800
+
763
801
it"raises an error if an inbound foreign key field does not exist on the related type, regardless of whether there are any `sourced_from` fields or not"do
0 commit comments