Skip to content

Commit

Permalink
Merge branch 'defer/oustanding-defer-codegen' into preview/defer
Browse files Browse the repository at this point in the history
  • Loading branch information
calvincestari committed Jan 5, 2024
2 parents 8bdcbcc + f75b6b7 commit 68b9772
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Sources/Apollo/GraphQLResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,12 @@ fileprivate extension DataDict {
}

let mergedData = try pathDataDict._data.merging(newDataDict._data) { current, new in
throw Error.cannotOverwriteData(current, new)
// TODO: This is a quick fix for __typename being returned with fragments, needs a rethink!
if current != new {
throw Error.cannotOverwriteData(current, new)
}

return current
}

let mergedFulfilledFragments = pathDataDict._fulfilledFragments
Expand Down

0 comments on commit 68b9772

Please sign in to comment.