Skip to content

Commit a6f7b52

Browse files
fix: Removes Reflection output type encodable check
1 parent 7729118 commit a6f7b52

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

Sources/Graphiti/Definition/Reflection.swift

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ public enum Reflection {
44
return description.hasSuffix("Protocol")
55
}
66

7+
@available(*, deprecated, message: "No longer used")
78
public static func isEncodable(type: Any.Type) -> Bool {
89
if isProtocol(type: type) {
910
return true

Sources/Graphiti/Definition/TypeProvider.swift

-10
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,6 @@ extension TypeProvider {
8686
}
8787

8888
func getOutputType(from type: Any.Type, field: String) throws -> GraphQLOutputType {
89-
// TODO: Remove this when Reflection error is fixed
90-
guard Reflection.isEncodable(type: type) else {
91-
throw GraphQLError(
92-
message:
93-
// TODO: Add field type and use "type.field" format.
94-
"Cannot use type \"\(type)\" for field \"\(field)\". " +
95-
"Type does not conform to \"Encodable\"."
96-
)
97-
}
98-
9989
let graphQLType: GraphQLType
10090

10191
do {

0 commit comments

Comments
 (0)