Handle required fields (#6271)
This commit is contained in:
committed by
Antonio Davi Macedo Coelho de Castro
parent
4f1d3b0654
commit
e0e06ef131
@@ -159,8 +159,9 @@ const load = (
|
||||
[field]: {
|
||||
description: `This is the object ${field}.`,
|
||||
type:
|
||||
className === '_User' &&
|
||||
(field === 'username' || field === 'password')
|
||||
(className === '_User' &&
|
||||
(field === 'username' || field === 'password')) ||
|
||||
parseClass.fields[field].required
|
||||
? new GraphQLNonNull(type)
|
||||
: type,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user