Skip to content

Commit

Permalink
fix (#6431)
Browse files Browse the repository at this point in the history
  • Loading branch information
Moumouls authored Feb 21, 2020
1 parent 259d119 commit cbef90d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GraphQL/transformers/mutation.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const transformers = {
parseGraphQLSchema,
{ config, auth, info }
) => {
if (Object.keys(value) === 0)
if (Object.keys(value).length === 0)
throw new Parse.Error(
Parse.Error.INVALID_POINTER,
`You need to provide at least one operation on the relation mutation of field ${field}`
Expand Down Expand Up @@ -203,7 +203,7 @@ const transformers = {
parseGraphQLSchema,
{ config, auth, info }
) => {
if (Object.keys(value) > 1 || Object.keys(value) === 0)
if (Object.keys(value).length > 1 || Object.keys(value).length === 0)
throw new Parse.Error(
Parse.Error.INVALID_POINTER,
`You need to provide link OR createLink on the pointer mutation of field ${field}`
Expand Down

0 comments on commit cbef90d

Please sign in to comment.