Apollo-server: Missing TypeScript typing for Upload type (with fields like createReadStream)

Created on 18 Sep 2019  路  2Comments  路  Source: apollographql/apollo-server

Hi.

E.g. I searched for createReadStream occurrences in Apollo sources, but didn't find any mentions for it in d.ts files.

Most likely it should be something like:

interface Upload {
  filename: string;
  mimetype: string;
  encoding: string;
  createReadStream: () => Stream;
}
馃К typings

Most helpful comment

@dko-slapdash

You can get it from the FileUpload type from graphql-upload which I think is the underlying implementation..

All 2 comments

@dko-slapdash

You can get it from the FileUpload type from graphql-upload which I think is the underlying implementation..

This can be closed. @rheaditi is correct.

Was this page helpful?
0 / 5 - 0 ratings