parse-community / parse-community/parse-server
Missing GraphQL Schema for Setting Column Defaults When Creating a Class
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
I don’t see a way to add required and defaultValue properties to the schema at class creation time.
Steps to reproduce
Use the createClass mutation to create a class with something like:
addNumbers: [
{
name: "quantity"
required: true
defaultValue: 1
}
]
Actual Outcome
The last two properties seem to be missing from the schema.
Expected Outcome
Environment
Server
- Parse Server version:
4.3.0 - Operating system:
Windows 10 - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
localhost
Database
- System (MongoDB or Postgres):
MongoDB - Database version:
4.2.8 - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
MongoDB Atlas
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
GraphQL - SDK version:
N/A
Comments
Would the ability to set Class Level Permissions via the GraphQL createClass mutation be a part of this same issue, or something separate?
If desired, I could submit a GraphQL docs PR with related info added once the schema has been updated.
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 by tracing the GraphQL createClass mutation and its schema definition to determine where class fields are accepted. Confirm how required and defaultValue are handled elsewhere in Parse Server, then update the GraphQL schema and coverage so class creation accepts and preserves both properties.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, javascript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100