Skip to content

Commit d85a291

Browse files
authored
1 parent df7fcf8 commit d85a291

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GraphQL/transformers/mutation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const transformers = {
122122
parseGraphQLSchema,
123123
{ config, auth, info }
124124
) => {
125-
if (Object.keys(value) === 0)
125+
if (Object.keys(value).length === 0)
126126
throw new Parse.Error(
127127
Parse.Error.INVALID_POINTER,
128128
`You need to provide at least one operation on the relation mutation of field ${field}`
@@ -203,7 +203,7 @@ const transformers = {
203203
parseGraphQLSchema,
204204
{ config, auth, info }
205205
) => {
206-
if (Object.keys(value) > 1 || Object.keys(value) === 0)
206+
if (Object.keys(value).length > 1 || Object.keys(value).length === 0)
207207
throw new Parse.Error(
208208
Parse.Error.INVALID_POINTER,
209209
`You need to provide link OR createLink on the pointer mutation of field ${field}`

0 commit comments

Comments
 (0)