graphql对象是否有任何打字稿类型

时间:2020-04-01 08:47:00

标签: typescript graphql apollo apollo-server

我正在使用Apollo-server和Expressjs和Typescript编写Graphql服务器。

我在为Graphql对象定义类型时遇到问题:

export const isAuthenticated = (parent, args, { me }) => (me ? skip : new ForbiddenError('Not authenticated as user.'));

或文件对象:

    export default async (file, mimes: Array<string>) => {
      const { createReadStream, filename, mimetype } = await file;
      console.log(mimetype);
      ...
    }

我不知道诸如parent和args之类的对象的类型;但我认为有。有吗?

0 个答案:

没有答案