Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default value doesn't work #281

Open
PeterT11 opened this issue Apr 20, 2018 · 1 comment
Open

Default value doesn't work #281

PeterT11 opened this issue Apr 20, 2018 · 1 comment

Comments

@PeterT11
Copy link

PeterT11 commented Apr 20, 2018

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?

@vivek12345
Copy link

vivek12345 commented Jun 30, 2018

@PeterT11 I tried setting up the same project and I was able to createDraft.
screen shot 2018-07-01 at 4 09 58 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants