parse-community / parse-server

Parse Server for Node.js / Express
https://parseplatform.org
Apache License 2.0
20.94k stars 4.78k forks source link

Missing GraphQL Schema for Setting Column Defaults When Creating a Class #6947

Open 185driver opened 4 years ago

185driver commented 4 years ago

New Issue Checklist

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

Database

Client

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.

mtrezza commented 4 years ago

Thank you for reporting.

@Moumouls @davimacedo Since this is GraphQL issue, do you have any suggestions?

185driver commented 4 years ago

Because @davimacedo asked me to create this issue, I believe he plans to care for it.

Moumouls commented 4 years ago

Indeed, we have not yet supported all the options of the schemas !

This addition will requires time:

GraphQL Schema will also missing many other fields like indexes, CLP, protectedFields, and all others options available in JS/Rest API.

May be we need to split the Schema Operations in 3 Prs:

@185driver If you want we can work together on these additions :) i can begin some stuff as a guidande then you can help me to cover each cases.

What do you think about that @185driver

185driver commented 4 years ago

I appreciate the invite but I'm currently away from my parse server project and building something else so am unable to participate for now. I'll check back when I can.