Skip to content

Default value doesn't work #281

@PeterT11

Description

@PeterT11

I tried to play with the 'basic' project and found that I can't use createDraft mutation:
playground app
but I can use createPost without 'isPublished' value because this key has a default value.
playground database
if I add a line in the index.js, it will work fine.

    createDraft(parent, { title, text }, ctx, info) {
      return ctx.db.mutation.createPost(
        {
          data: {
            isPublished:false, //add it this value.
            title,
            text,
          },
        },
        info,
      )
    },

Could anyone explain what's the problem? or is it a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions