parse-server: GraphQL auto schema findQuery is not generated for classes named in plural
Issue Description
GraphQL auto schema gets generated only partially for classes named in plural. get seems to work fine, but findQuery is not available at all.
Steps to reproduce
Create a collection named in plural, eg Data, UserData, Comments etc
Expected Results
Be able to issue find GQL query
Actual Outcome
Schema generated only partially
Environment Setup
- Server
- parse-server version (Be specific! Don’t say ‘latest’.) : 3.9.0
Logs/Trace
n/a
I understand this is a bad practice to name collection in plural (i have some legacy code), but for sure it’s possible to handle by adding a few lines of code in generator for such edge cases. (when pluralize’s output equals className)
I’m looking forward to add a PR for that but i’m not sure what would be a better way to name it. commentses / comments_ / commentss / … ?
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 2
- Comments: 17 (9 by maintainers)
Commits related to this issue
- GraphQL: Add "Objects" suffix to schema find query classname if plural and singular are identical (#6218) — committed to julianvogels/parse-server by deleted user 4 years ago
I interested in contributing to projects I use. I will do that for dear parse community as soon as possible.
I think your suggestion is interesting, we have many exemple on how to support option via Env vars. Since we are in open source project, each addition is welcome. I invite you to create a parse-server fork and may be start a pull request ? 😃 Sounds good for you ?