my mongodb field graphql null code example
Example: mongo db returning null in array of string graphql
// Using the same query as aboveconst result = await client.query({ query: query });if (result.data.restaurants) { result.data.restaurants.forEach(restaurant => { if (restaurant) { console.log(restaurant.name); console.log(restaurant.location.address); } });}