parse-community / parse-community/parse-server
GraphQL auto schema findQuery is not generated for classes named in plural
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
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 / ... ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the GraphQL auto-schema generator and reproduce the issue with a plural class such as Data, UserData, or Comments on parse-server 3.9.0. Trace the pluralize handling and verify that the generated schema exposes findQuery for the class while retaining the existing get behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, javascript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100