Skip to content

Commit eb234d1

Browse files
authored
Merge pull request #62 from jbttn/jbutton/fix-bool-decoding
Fix boolean decoding for Map objects
2 parents f3e93ab + 026ff6e commit eb234d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/GraphQL/Map/Map.swift

+4
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,10 @@ extension Map : Codable {
606606
if container.decodeNil() {
607607
self = .null
608608
}
609+
610+
else if let bool = try? container.decode(Bool.self) {
611+
self = .bool(bool)
612+
}
609613

610614
else if let double = try? container.decode(Double.self) {
611615
self = .number(Number(double))

0 commit comments

Comments
 (0)