mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-01-20 20:01:22 +00:00
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.
20 lines
315 B
JavaScript
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',
|
|
],
|
|
}),
|
|
},
|
|
}
|