title: How to execute a directive before a mutation is committed to the database?
body: <p>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</p>
  <pre><code>type Quest {
      name @i18n  # simple
  } 
  
  type Quest {
      nameEn
      nameJa
      nameFr
      ...  # omg
  }
  </code></pre>
  <p>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).</p>
  <p>I do not see how I could do something similar with resolvers. For any possible mutation, I want to check if any field has the <code>@i18n</code> directive, and execute it (so that it fetches my user's language locale from the context and modify the field with the locale as suffix.</p>
  <p>In other words, I would like to make a directive to modify the key of a field, not its value.</p>
  <p>How would you accomplish that ?</p>
  <p>My question was purposefully made general, but if there's a platform specific solution, I'm using the GRANDstack with Neo4j as db and neo4j-graphql-js with Apollo server at the API level.</p>
  <p>EDIT: Asked <a href="https://stackoverflow.com/questions/65248118/how-can-we-parse-and-modify-a-schema-with-makeaugmentedschema">another question</a> for a different way to solve my problem by modifying the schema at build time.</p>