-
Notifications
You must be signed in to change notification settings - Fork 223
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
Optional double quotes for case insensitive columns? #248
Comments
Have you tried with From the docs: email: {
type: GraphQLString,
// if the column name is different, it must be specified specified
sqlColumn: 'email_address'
}, |
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 This approach in addition to using It would be great to drop this custom code and use something standard from join-monster. |
JM supports a way of overriding the column name. I think adding more on JM's part is making the API unnecessarily complex |
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: