Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if an action returns a list of objects, codegen still returns an object #28

Open
wawhal opened this issue Apr 15, 2020 · 5 comments
Open
Labels
bug Something isn't working

Comments

@wawhal
Copy link
Contributor

wawhal commented Apr 15, 2020

These are the bunch of cases where codegen does incorrect things:

  1. If the derived action returns an object but the parent operation returns a list, it causes runtime error.
  2. If an action returns a list, codegen still returns just an object
@andoks
Copy link

andoks commented Jul 29, 2020

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.

@pimsomeday
Copy link

@wawhal any updates on .2?

@toniocodo
Copy link

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:
image

introspected schema:
image

on version v2.0.0-alpha.2.

Please advice

@briareus-the-titan
Copy link

having this exact same issue

@briareus-the-titan
Copy link

is there a work around yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants