You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a GraphQL object Activity with a field named "plannedDate", but I personally prefer my database to be case insensitive, so my PostgreSQL field is planneddate, without double quotes.
The problem is, if I use Join Monster with the "plannedDate" GraphQL field, it assumes it's the same case-sensitive name in the database, which it isn't in my case.
I'm currently stripping double quotes but only for these fields (the "'s from the aliases must be kept), but is it possible to achieve the same thing without removing the quotes?
Thanks.
The text was updated successfully, but these errors were encountered:
Yes, this would be a solution, but it would be easier to just ignore the double quotes for the identifiers instead of setting sqlColumn for every camelCase field.
Knex supports a "wrapIdentifier", which can be used to do it or convert camelCase to snake_case, for example. knex/knex#2084
Anyway, I'm using the camelCase convention in the database too for now.
I'm currently auto-generating the join-monster sqlColumn information for all the fields using the keys in schema._typeMap.TypeName._fields, converting to whatever I need.
This approach in addition to using wrapIdentifier allows me to use a camelCase -> snake_case or camelCase -> lowercase correctly.
It would be great to drop this custom code and use something standard from join-monster.
I have a GraphQL object Activity with a field named "plannedDate", but I personally prefer my database to be case insensitive, so my PostgreSQL field is planneddate, without double quotes.
The problem is, if I use Join Monster with the "plannedDate" GraphQL field, it assumes it's the same case-sensitive name in the database, which it isn't in my case.
I'm currently stripping double quotes but only for these fields (the "'s from the aliases must be kept), but is it possible to achieve the same thing without removing the quotes?
Thanks.
The text was updated successfully, but these errors were encountered: