title: Unknown type "Upload" - Apollo Server Express with graphql-upload Node 14
body: <p>I am working with GraphQL and is facing an issue with File Upload. My Node version is v14.16.0</p>
  <p>I am getting error as below</p>
  <blockquote>
  <p>Error: Unknown type &quot;Upload&quot;. Did you mean &quot;Float&quot;?</p>
  </blockquote>
  <p>Below are the package version installed</p>
  <p>Package versions</p>
  <pre><code>&quot;dependencies&quot;: {
      &quot;apollo-server-express&quot;: &quot;^2.23.0&quot;,
      &quot;bcryptjs&quot;: &quot;^2.4.3&quot;,
      &quot;compression&quot;: &quot;^1.7.4&quot;,
      &quot;consola&quot;: &quot;^2.15.3&quot;,
      &quot;dotenv&quot;: &quot;^8.2.0&quot;,
      &quot;express&quot;: &quot;^4.17.1&quot;,
      &quot;graphql-upload&quot;: &quot;^11.0.0&quot;,
      &quot;jsonwebtoken&quot;: &quot;^8.5.1&quot;,
      &quot;mongoose&quot;: &quot;^5.12.5&quot;,
      &quot;nodemon&quot;: &quot;^2.0.7&quot;,
      &quot;yup&quot;: &quot;^0.32.9&quot;
    }
  </code></pre>
  <p>Below is my server setup done with apollo-server-express and graphql-upload package</p>
  <pre><code>import express from &quot;express&quot;;
  import consola from &quot;consola&quot;;
  import { ApolloServer } from &quot;apollo-server-express&quot;;
  const { error, success } = consola;
  import { PORT } from &quot;./config/index.js&quot;;
  import { typeDefs, resolvers } from &quot;./graphql/index.js&quot;;
  import * as AppModels from &quot;./models/index.js&quot;;
  import compression from &quot;compression&quot;;
  import { graphqlUploadExpress } from &quot;graphql-upload&quot;;
  //Initialize the app
  const app = express();
  app.use(compression());
  app.use(
    graphqlUploadExpress({
      maxFileSize: 30000000,
      maxFiles: 20,
    })
  );
  
  const server = new ApolloServer({
    typeDefs,
    resolvers,
    uploads: false,
    context: {
      ...AppModels,
    },
  });
  app.use(express.static(&quot;public&quot;));
  
  server.applyMiddleware({ app });
  app.listen(PORT, () =&gt; {
    success({
      badge: true,
      message: `Server started at ${PORT}`,
    });
  });
  </code></pre>
  <p>Here are my type definition for imageUpload Mutation</p>
  <pre><code>import { gql } from &quot;apollo-server-express&quot;;
  export default gql`
    extend type Mutation {
      imageUploader(file: Upload!): String!
    }
  `;
  </code></pre>
  <p>My resolver looks like this</p>
  <pre><code>import { createWriteStream } from &quot;fs&quot;;
  import { parse, join } from &quot;path&quot;;
  import { URL } from &quot;../../config/index.js&quot;;
  export default {
    Mutation: {
      imageUploader: async (_, { file }) =&gt; {
        let { filename, createReadStream } = await file;
        let stream = createReadStream();
        let { name, ext } = parse(filename);
        name = name.replace(/([^a-z0-9 ]+)/gi, &quot;-&quot;).replace(&quot; &quot;, &quot;_&quot;);
        let serverFile = `D:/${name}${ext}`;
        let writeStream = await createWriteStream(serverFile);
        await stream.pipe(writeStream);
        //serverFile = `${URL}/${serverFile.split(&quot;uploads&quot;)[1]}`;
        return serverFile;
      },
    },
  };
  </code></pre>