title: The Apollo error doesn't contain the payload
body: <p>Catching server errors on the client side. I'm passing an object with the Apollo error from which I read what went wrong. I've been using this approach throughout the project and it works fine, but for some reason in this particular instance, it doesn't. I'm not doing anything differently, but the payload just isn't there.</p>
  <p>Server code:</p>
  <pre><code>const { UserInputError } = require('apollo-server-express');
  
  const commentResolver = {
    Mutation: {
      createComment: async (_, { postID, body }, context) =&gt; {
        const user = checkAuth(context);
        // empty error object I fill with messages and pass it with the error
        const errors = {};
  
        try {
          if (body.trim() === '') {
            errors.body = 'Comments must not be empty';
            throw new UserInputError('Empty comment', { errors });
          }
        // ...more code
  </code></pre>
  <p>Client code:</p>
  <pre><code>const [submitComment] = useMutation(CREATE_COMMENT, {
      variables: {
        postID,
        body: comment,
      },
      onError: (err) =&gt; {
        console.log(err.graphQLErrors[0].extensions.exception.errors);   // prints undefined
        setErrors(err.graphQLErrors[0].extensions.exception.errors);
      },
  </code></pre>
  <p>What I get when printing just the err object:
  <a href="https://i.stack.imgur.com/N33pB.png" rel="nofollow noreferrer">no errors field in it</a></p>