Skip to content

Commit

Permalink
fix(datastore): add required fields in selection set for hasOne-belon…
Browse files Browse the repository at this point in the history
…gsTo relationship
  • Loading branch information
thisisabhash committed Jan 18, 2024
1 parent ef4224b commit 80c3935
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extension SelectionSet {
let schema = ModelRegistry.modelSchema(from: associatedModelName) {
if recursive {
var recursive = recursive
if field._isBelongsToOrHasOne {
if field._isBelongsToOrHasOne && !field.isRequired {
recursive = false
}

Expand Down

0 comments on commit 80c3935

Please sign in to comment.