# Set Column Defaults When Creating Class with GraphQL Mutation

**URL:** <https://community.parseplatform.org/t/set-column-defaults-when-creating-class-with-graphql-mutation/943>\
**Category:** GraphQL API\
**Created:** [October 16, 2020, 1:00am UTC](https://community.parseplatform.org/t/set-column-defaults-when-creating-class-with-graphql-mutation/943 "2020-10-16T01:00:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![185driver](https://community.parseplatform.org/user_avatar/community.parseplatform.org/185driver/32/282_2.png) [@185driver](https://community.parseplatform.org/u/185driver)\
**Post date:** [October 16, 2020, 1:00am UTC](https://community.parseplatform.org/t/set-column-defaults-when-creating-class-with-graphql-mutation/943/1 "2020-10-16T01:00:17Z")

</div>

I am creating a custom `Item` Class using a GraphQL mutation. The `quantity` field should be `required` and have a `defaultValue: 1`. I don’t see a way to add these last two details to the schema at class creation time. Am I missing a way it can be accomplished using this same mutation?

Something like:

```auto
addNumbers: [
  {
    name: "quantity"
    required: true
    defaultValue: 1
  }
]

```

```auto
mutation {
  createClass(
    input: {
      name: "Item"
      schemaFields: {
        addNumbers: [
          { name: "quantity" }
        ]
      }
    }
  ) {
    class {
      name
      schemaFields {
        name
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![davimacedo](https://community.parseplatform.org/user_avatar/community.parseplatform.org/davimacedo/32/316_2.png) [@davimacedo](https://community.parseplatform.org/u/davimacedo)\
**Post date:** [October 16, 2020, 2:14am UTC](https://community.parseplatform.org/t/set-column-defaults-when-creating-class-with-graphql-mutation/943/2 "2020-10-16T02:14:08Z")

</div>

It is probably missing in the GraphQL schema. Do you mind to open an issue in the Parse Server repo? I can tackle this one.

---

<div class="post-metadata">

**Author:** ![185driver](https://community.parseplatform.org/user_avatar/community.parseplatform.org/185driver/32/282_2.png) [@185driver](https://community.parseplatform.org/u/185driver)\
**Post date:** [October 16, 2020, 4:20am UTC](https://community.parseplatform.org/t/set-column-defaults-when-creating-class-with-graphql-mutation/943/3 "2020-10-16T04:20:40Z")

</div>

Sure. Will do. Thanks.
