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) #6196

Merged
merged 1 commit into from
Aug 17, 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

@github-actions github-actions bot added the area/graphql Issues related to GraphQL support on Dgraph. label Aug 17, 2020
@arijitAD arijitAD merged commit a833386 into release/v20.07 Aug 17, 2020
@joshua-goldstein joshua-goldstein deleted the arijitAD/v20.07-empty-value-id branch August 11, 2022 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/graphql Issues related to GraphQL support on Dgraph.
Development

Successfully merging this pull request may close these issues.

2 participants