Closed JonasBorchelt closed 4 years ago
I'll look into it tonight. Is the schema the same as in the songs example?
Agoo uses directives to associate a GraphQL type with a Ruby class. During evaluation fields resolve into Ruby objects Agoo must then determine the type for a given Ruby class. It could be smarter and look at the schema types except when a Union or Interface is used and then there is no choice but to have a map for Ruby class to GraphQL type. Right now Agoo uses that map for all calls to __typename.
To fix your immediate issue, make sure each type has an @ruby()
directive. An example if this is the test directory but here is what the Artist type would start with:
type Artist @ruby(class:"Artist") {
Leave this issue open though and I'll try to get __typename to fallback to the schema if it can.
Perfect! Much thanks for your answer. This helps a lot. Yeah, I was debugging through the code and found the part where it checks if "ruby" is there.
Thank you for your effort.
Hey again,
if you do the following request in the song example:
You get:
It's working on the query root with no problem. But as soon it's on a type, it's not working.