neo4j-graphql-js

How to execute a directive before a mutation is committed to the database?

懵懂的女人 提交于 2021-01-05 07:43:25
问题 I'm trying to add the internationalization feature to my database. It would be quite difficult to maintain a schema graphql if I needed to duplicate all translatable fields type Quest { name @i18n # simple } type Quest { nameEn nameJa nameFr ... # omg } The problem I'm facing is that field directives are only executed during a query (or, once a mutation has finished, to return the result). I do not see how I could do something similar with resolvers. For any possible mutation, I want to check