title: Error Unknown type "DateTime" on Apollo Payload of gql
body: <p>I have a lot of problem, but this time my problem is GraphQL and its payload, my <code>schema.gql</code> and <code>resolvers.js</code> files looks like these:</p>
  <pre><code>    # schema.gql
      scalar GraphQLDateTime
      scalar GraphQLDate
      scalar GraphQLTime
      
      type Query {
        magicQuery(
          idMagic: Int
          magicDate: GraphQLDateTime
        ): DamnWow
      }
      
      type DamnWow {
        _id: String
        magicDateResult: GraphQLDateTime
      }
  </code></pre>
  <pre><code>    # resolvers.js
      
      const { GraphQLDate, GraphQLTime, GraphQLDateTime } = require('graphql-iso-date');
      
      const resolvers = {
        Query: {
          magicQuery: async (root, { idMagic, magicDate }, context) =&gt; {
            // It's never enter here
            console.warn(idMagic, magicDate);
            const result = { _id: 'wow1', magicDate: new Date() };
            return result;
          }
        },
      
        GraphQLDateTime: GraphQLDateTime,
        GraphQLDate: GraphQLDate,
        GraphQLTime: GraphQLTime
      };
      
      module.exports = resolvers;
  </code></pre>
  <p>When I try to use my payload with a query like that:</p>
  <pre><code>    # query
      query magicQuery($idMagic: Int, $magicDate: DateTime) {
        magicQuery(idMagic: $idMagic, magicDate: $magicDate) {
          _id
          magicDateResult
        }
      }
      
      # variables
      # {
      #   &quot;idMagic&quot;: 1,
      #   &quot;magicDate&quot;: &quot;2007-12-03T10:15:30Z&quot;
      # }
  </code></pre>
  <p>it's return me an error:</p>
  <pre><code>    {
        &quot;error&quot;: {
          &quot;errors&quot;: [
            {
              &quot;message&quot;: &quot;Unknown type \&quot;DateTime\&quot;.&quot;,
              &quot;locations&quot;: [
                {
                  &quot;line&quot;: 1,
                  &quot;column&quot;: 45
                }
              ],
              &quot;extensions&quot;: {
                &quot;code&quot;: &quot;GRAPHQL_VALIDATION_FAILED&quot;,
                &quot;exception&quot;: {
                  &quot;stacktrace&quot;: [
                    &quot;GraphQLError: Unknown type \&quot;DateTime\&quot;.&quot;,
                    &quot;    at Object.NamedType (/home/alex/workspace/team/node_modules/graphql/validation/rules/KnownTypeNamesRule.js:57:29)&quot;,
                    &quot;    at Object.enter (/home/alex/workspace/team/node_modules/graphql/language/visitor.js:323:29)&quot;,
                    &quot;    at Object.enter (/home/alex/workspace/team/node_modules/graphql/utilities/TypeInfo.js:370:25)&quot;,
                    &quot;    at visit (/home/alex/workspace/team/node_modules/graphql/language/visitor.js:243:26)&quot;,
                    &quot;    at Object.validate (/home/alex/workspace/team/node_modules/graphql/validation/validate.js:69:24)&quot;,
                    &quot;    at validate (/home/alex/workspace/team/node_modules/apollo-server-core/dist/requestPipeline.js:221:34)&quot;,
                    &quot;    at Object.&lt;anonymous&gt; (/home/alex/workspace/team/node_modules/apollo-server-core/dist/requestPipeline.js:118:42)&quot;,
                    &quot;    at Generator.next (&lt;anonymous&gt;)&quot;,
                    &quot;    at fulfilled (/home/alex/workspace/team/node_modules/apollo-server-core/dist/requestPipeline.js:5:58)&quot;
                  ]
                }
              }
            }
          ]
        }
      }
  </code></pre>
  <p>If I use same parameter directy in my code it works fine.</p>
  <p>Does someone know the cause of this error?</p>