GraphQL: Fix undefined Array (#5926)
* Add Spec * Fix Undefined Array * Nullability policy
This commit is contained in:
committed by
Antonio Davi Macedo Coelho de Castro
parent
0fa315fc5b
commit
cea1988ce9
@@ -639,6 +639,7 @@ const load = (
|
||||
description: `Use Inline Fragment on Array to get results: https://graphql.org/learn/queries/#inline-fragments`,
|
||||
type,
|
||||
async resolve(source) {
|
||||
if (!source[field]) return null;
|
||||
return source[field].map(async elem => {
|
||||
if (
|
||||
elem.className &&
|
||||
|
||||
Reference in New Issue
Block a user