GraphQL: Fix undefined Array (#5926)

* Add Spec

* Fix Undefined Array

* Nullability policy
This commit is contained in:
Antoine Cormouls
2019-08-16 20:12:29 +02:00
committed by Antonio Davi Macedo Coelho de Castro
parent 0fa315fc5b
commit cea1988ce9
2 changed files with 33 additions and 0 deletions

View File

@@ -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 &&