title: Can't custom value of graphql enum
body: <p>I have looked this question: <a href="https://stackoverflow.com/questions/45056347/how-to-use-or-resolve-enum-types-with-graphql-tools">How to use or resolve enum types with graphql-tools?</a> </p>
  
  <p>And, this doc: <a href="https://www.apollographql.com/docs/graphql-tools/scalars/#internal-values" rel="nofollow noreferrer">https://www.apollographql.com/docs/graphql-tools/scalars/#internal-values</a></p>
  
  <p>Now, I want to custom the value of graphql <code>enum</code>. </p>
  
  <p><code>typeDefs.ts</code>:</p>
  
  <pre class="lang-js prettyprint-override"><code>import { gql } from 'apollo-server';
  
  export const typeDefs = gql`
    enum Device {
      UNKNOWN
      DESKTOP
      HIGH_END_MOBILE
      TABLET
      CONNECTED_TV
    }
  
    type CampaignPerformanceReport {
      campaignNme: String!
      campaignId: ID!
      device: Device
    }
  
    type Query {
      campaignPerformanceReports: [CampaignPerformanceReport]!
    }
  `;
  </code></pre>
  
  <p><code>resolvers.ts</code>:</p>
  
  <pre class="lang-js prettyprint-override"><code>import { IResolvers } from 'graphql-tools';
  import { IAppContext } from './appContext';
  
  export const resolvers: IResolvers = {
    Device: {
      UNKNOWN: 'Other',
      DESKTOP: 'Computers',
      HIGH_END_MOBILE: 'Mobile devices with full browsers',
      TABLET: 'Tablets with full browsers',
      CONNECTED_TV: 'Devices streaming video content to TV screens',
    },
    Query: {
      async campaignPerformanceReports(_, __, { db }: IAppContext) {
        return db.campaignPerformanceReports;
      },
    },
  };
  </code></pre>
  
  <p>As you can see, I custom the value of <code>Device</code> enum in the resolver.</p>
  
  <p><code>db.ts</code>: a fake db with datas</p>
  
  <pre class="lang-js prettyprint-override"><code>enum Device {
    UNKNOWN = 'Other',
    DESKTOP = 'Computers',
    HIGH_END_MOBILE = 'Mobile devices with full browsers',
    TABLET = 'Tablets with full browsers',
    CONNECTED_TV = 'Devices streaming video content to TV screens',
  }
  
  export const db = {
    campaignPerformanceReports: [
      {
        campaignId: 1,
        campaignNme: 'test',
        device: Device.DESKTOP,
      },
    ],
  };
  </code></pre>
  
  <p>I also made an integration test for this:</p>
  
  <pre class="lang-js prettyprint-override"><code> test.only('should query campaign performance reports correctly with executable graphql schema', async () =&gt; {
        const schema = makeExecutableSchema({ typeDefs, resolvers });
        console.log(printSchema(schema));
        const server: ApolloServerBase = new ApolloServer({ schema, context: { db } });
        const { query }: ApolloServerTestClient = createTestClient(server);
        const res: GraphQLResponse = await query({ query: Q.campaignPerformanceReports });
        expect(res).toMatchInlineSnapshot(`
          Object {
            "data": Object {
              "campaignPerformanceReports": Array [
                Object {
                  "campaignId": "1",
                  "campaignNme": "test",
                  "device": "DESKTOP",
                },
              ],
            },
            "errors": undefined,
            "extensions": undefined,
            "http": Object {
              "headers": Headers {
                Symbol(map): Object {},
              },
            },
          }
        `);
      });
  </code></pre>
  
  <p>As you can see, the result of snapshot testing. The value of <code>device</code> field is still <strong>"DESKTOP"</strong>, I expected the value should be <strong>"Computers"</strong></p>
  
  <p>Dependencies version:</p>
  
  <pre><code>"apollo-server": "^2.9.3",
  "apollo-server-express": "^2.9.3",
  "graphql": "^14.5.4",
  </code></pre>
  
  <p>The minimal repo: <a href="https://github.com/mrdulin/apollo-graphql-tutorial/tree/master/src/custom-scalar-and-enum" rel="nofollow noreferrer">https://github.com/mrdulin/apollo-graphql-tutorial/tree/master/src/custom-scalar-and-enum</a></p>