lib/graphql_grpc/schema.rb in graphql_grpc-0.1.7 vs lib/graphql_grpc/schema.rb in graphql_grpc-0.1.8
- old
+ new
@@ -24,12 +24,13 @@
module GraphqlGrpc
# :nodoc:
module Schema
# TODO: Find better way to detect queries
- # Currently look for methods named 'get' or with no args
+ # Currently look for methods named 'get', 'find' or with no args
def query?(name_sym, rpc_desc)
name_sym.to_s.start_with?('get') ||
+ name_sym.to_s.start_with?('find') ||
rpc_desc.rpc_desc.input == Google::Protobuf::Empty
end
def streaming_response?(rpc_desc)
rpc_desc&.rpc_desc&.output.class == GRPC::RpcDesc::Stream