Adrinalin4ik / Nestjs-Graphql-Tools

NestJS Graphql Tools is a flexible solution that provides a bunch of decorators for solving problems like n+1 request, filtering, sorting, pagination, polymorphic relation, graphql field extraction. It is fully based on decorators. To use it you can just add a decorator to your resolver.
GNU General Public License v3.0
79 stars 8 forks source link

Camelcase properties get generated as lowercase in the filter output #40

Closed peter-olom closed 7 months ago

peter-olom commented 7 months ago

Describe the bug Camelcase properties get generated as lowercase in the filter output e.g adminHome -> adminhome

To Reproduce Steps to reproduce the behavior:

  1. Create an Entity and ObjectType with camel cased property e.g adminHome
  2. Pass the filter as a where prop to the entity repository
  3. Error like adminhome is not a valid column should throw

Expected behavior Should work just like the non-camel cased columns.

Desktop (please complete the following information):

Adrinalin4ik commented 7 months ago

@peter-olom that's true. We don't support camel case now. Overall, postgres doesn't like using camel case. In order to use camel case in porstgres you would need to wrap tables, fields in double quotes which is not so native. Maybe in future we will add support of it, but not for now.