roschaefer deb4b4f698 fix: return null for missig translations
A query such as `{ notifications }` would return `null` for Locations
with a missing translation, e.g. `nameRU`. This would not happen for
queries implemented by `neo4j-graphql-js` because they nullify all
missing attributes automatically.
2019-11-12 19:14:34 +01:00

20 lines
315 B
JavaScript

import Resolver from './helpers/Resolver'
export default {
Location: {
...Resolver('Location', {
undefinedToNull: [
'nameEN',
'nameDE',
'nameFR',
'nameNL',
'nameIT',
'nameES',
'namePT',
'namePL',
'nameRU',
],
}),
},
}