title: Why apollo server custom directive not working?
body: <p>I am trying to implement a custom directive with apollo server. I took the example from the official site.</p>
  
  <p>My query is like below:</p>
  
  <pre><code>directive @upper on FIELD_DEFINITION
  
  type Query {
    hello: String @upper
  }
  </code></pre>
  
  <p>My resolver is like below:</p>
  
  <pre><code>Query:{
          async hello(){
              return "hello world";
          }
      }
  </code></pre>
  
  <p>Here is my apollo server config for custom directive:</p>
  
  <pre><code>const { ApolloServer, SchemaDirectiveVisitor } = require('apollo-server-express');
  const { defaultFieldResolver } = require("graphql");
  
  class UpperCaseDirective extends SchemaDirectiveVisitor {
      visitFieldDefinition(field) {
        const { resolve = defaultFieldResolver } = field;
        field.resolve = async function (...args) {
          const result = await resolve.apply(this, args);
          if (typeof result === "string") {
            return result.toUpperCase();
          }
          return result;
        };
      }
    }
  
  const server = new ApolloServer({
      schema,
      schemaDirectives: {
          upper: UpperCaseDirective
      },
      introspection: true,
      playground: true,
      cors: cors()
  
  });
  </code></pre>
  
  <p>The output I always get :</p>
  
  <pre><code>{
    "data": {
      "hello": "hello world"
    }
  } 
  </code></pre>
  
  <p>Why the custom directive is not activated? Why the output is not in uppercase?</p>