graphile / crystal

🔮 Graphile's Crystal Monorepo; home to Grafast, PostGraphile, pg-introspection, pg-sql2 and much more!
https://graphile.org/
Other
12.63k stars 572 forks source link

[v4] Computed field function call omits non-null argument value. #547

Closed danscan closed 7 years ago

danscan commented 7 years ago

I have a function (computed field) like my_schema.user_total_purchased_shares_in_company(_user my_schema.user, company_id integer), but when I attempt to select its field in a query, I get the error message: function my_schema.user_total_purchased_shares_in_company(my_schema.\"user\") does not exist

This is a query that encounters the error:

{
  viewer {
    id
    totalPurchasedSharesInCompany(companyId: 2)
  }
}
benjie commented 7 years ago

I was unable to reproduce this. Whilst digging around I did find a couple bugs in the function code, so it's possible I've fixed it now in postgraphql@4.0.0-alpha2.10 - can you give that a try and if it still fails please provide a minimal schema that reproduces the issue?

danscan commented 7 years ago

@benjie Yep, I'll try this today and report back!

danscan commented 7 years ago

@benjie Awesome! This seems to be resolved in postgraphql@4.0.0-alpha2.10