Skip to content

GraphQL auto schema findQuery is not generated for classes named in plural #6218

Open
@BufferUnderflower

Description

@BufferUnderflower

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 / ... ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions