codegen-assets
codegen-assets copied to clipboard
if an action returns a list of objects, codegen still returns an object
These are the bunch of cases where codegen does incorrect things:
- If the derived action returns an object but the parent operation returns a list, it causes runtime error.
- If an action returns a list, codegen still returns just an object
I had this issue too with the golang codegen.
For golang in particular, the custom types generated also are missing the required struct-tags to ensure the json generated has correct case when returned to hasura. Since the golang struct fields have to be capitalized for the marshaling to work, this is something that will often be an issue.
@wawhal any updates on .2?
Hello, we are still facing this issue with custom actions. It seems that generated schema is giving incorrect result type even though action is correctly typed:
console:
introspected schema:
on version v2.0.0-alpha.2.
Please advice
having this exact same issue
is there a work around yet?