Closed andreibondarev closed 1 year ago
Did you find your answer @andreibondarev ?
@dblock I didn't. Instead of passing a hash I'm passing a string in the following format now:
{
Get {
Article(
where: '{ path: ["id"], operator: Equal, valueString: "..." }'
)
}
}
This is where it's being used: https://github.com/andreibondarev/weaviate-ruby/blob/master/lib/weaviate/query.rb#L127-L149
Thanks. I think we should support this. If you have time @andreibondarev write some failing specs, and maybe even implement it? We could probably emit a class at runtime or something like that.
Description I'm working on writing a Ruby wrapper for a GraphQL API. Some of the endpoints accept things like this (from the docs):
and
Passing
"asc"
,'asc'
or a variable with the nameasc
throws a GraphQL error. Respectively -- passing'Equal'
,"Equal"
errors out as well.I was able to get it working by defining an
Equal
class, module, constant or OpenStruct and passing it in:but this feels extremely hacky.
Is there a cleaner way to do this? The problem is that I can't hardcode
order: Equal
because the value is dynamic.Here's my current code where I parse the query:
Thank you!