diff --git a/lib/graphql_grpc/function.rb b/lib/graphql_grpc/function.rb
index <HASH>..<HASH> 100644
--- a/lib/graphql_grpc/function.rb
+++ b/lib/graphql_grpc/function.rb
@@ -96,7 +96,13 @@ module GraphqlGrpc
       if result.is_a?(Enumerator)
         [].tap { |arr| result.each { |e| arr << e } }
       else
-        result.to_hash
+        if result.respond_to?(:to_hash)
+          result.to_hash
+        elsif result.respond_to?(:to_h)
+          result.to_h
+        else
+          raise NotImplementedError
+        end
       end
     end
 
diff --git a/lib/graphql_grpc/version.rb b/lib/graphql_grpc/version.rb
index <HASH>..<HASH> 100644
--- a/lib/graphql_grpc/version.rb
+++ b/lib/graphql_grpc/version.rb
@@ -1,3 +1,3 @@
 module GraphqlGrpc
-  VERSION = '0.1.12'.freeze
+  VERSION = '0.1.13'.freeze
 end
Updating code to handle refactored gRPC response method; #to_hash -> #to_h.