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

Prevent empty values in fields having id directive. (#6177) #6197

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

arijitAD
Copy link

@arijitAD arijitAD commented Aug 17, 2020

Fixes GRAPHQL-458

Schema:

type Post {
    id: ID!
    title: String! @id
    text: String!
}

Mutation:

mutation AP {
   addPost(input: [{title: "", text: "TextHello" }]) {
    post{
      id
      title
      text
    }
    numUids
  }
}

This PR errors out on the following mutation which was previously allowed.

(cherry picked from commit d6975fd)


This change is Reviewable

Docs Preview: Dgraph Preview

@arijitAD arijitAD requested review from manishrjain and a team as code owners August 17, 2020 04:08
@arijitAD arijitAD merged commit b3cede5 into release/v20.03 Sep 1, 2020
@arijitAD arijitAD deleted the arijitAD/v20.03-empty-value-id branch September 1, 2020 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants