Wener Notes

TypeGraphQL

约 1 分钟阅读
标签:TypeScript

Notes

  • @Args()
  • @ArgsType()
  • @Authorized()
  • @Ctx()
  • @EnumType()
  • @Field()
  • @FieldResolver()
  • @Info()
  • @InputType()
  • @InterfaceType()
  • @Mutation()
  • @ObjectType()
  • @PubSub()
  • @Query()
  • @Resolver()
  • @Root()
  • @Subscription()
  • @UseMiddleware()
  • @ValidateArgs()

Internal

  • getMetadataStorage
TypeScript
// 全局注册中心
import { getMetadataStorage } from 'type-graphql';

// @InputType() 等同于
getMetadataStorage().collectInputMetadata({
  name: name || target.name,
  target,
  description: options.description,
});

// 等同于记录定义 - 等到调用 build 的时候才开始正式处理
MetadataStorage.inputTypes.push(definition)

关联信息

反向链接、本文链接的其他页面和外部资料。

反向链接

  • GraphQL Awesome
    笔记 · MichalLytek/type-graphql

    WebUI · graphql/graphiql · graphql/graphql-playground · https://www.graphqlbin.com/v2/new · graphql-kit/graphql-voyager · interactive graph

References

GitHub6 条
最近更新commit 74bb443Edit

On this page