🌐
Typegraphql
typegraphql.com › docs › custom-decorators.html
Custom decorators · TypeGraphQL
Custom decorators are a great way to reduce the boilerplate and reuse some common logic between different resolvers. TypeGraphQL supports three kinds of custom decorators - method, resolver class and parameter.
🌐
GitHub
github.com › MichalLytek › type-graphql
GitHub - MichalLytek/type-graphql: Create GraphQL schema and resolvers with TypeScript, using classes and decorators! · GitHub
Create GraphQL schema and resolvers with TypeScript, using classes and decorators! - MichalLytek/type-graphql
Starred by 8.1K users
Forked by 673 users
Languages   TypeScript 94.5% | JavaScript 4.5%
🌐
The Guild
the-guild.dev › graphql › codegen › plugins › typescript › typescript-type-graphql
TypeScript TypeGraphQL
April 2, 2026 - This plugin should be compatible with other client-side plugins, such as typescript-operations. Some differences with the types generated by the basic TypeScript plugin: classes are generated instead of interfaces · TypeGraphQL decorators like @ObjectType and @Field will be added ·
🌐
Typegraphql
typegraphql.com
TypeGraphQL · Modern framework for GraphQL API in Node.js
Create the schema, types and resolvers only with TypeScript, using classes and decorators! Use features like automatic validation, authorization guards, dependency injection and plenty more... Use only classes and decorators to define your GraphQL schema. No need to define types in SDL and no need to create interfaces for them!
🌐
Typegraphql
typegraphql.com › docs › types-and-fields.html
Types and Fields · TypeGraphQL
The first thing we must do is decorate the class with the @ObjectType decorator. It marks the class as the type known from the GraphQL SDL or GraphQLObjectType from graphql-js:
🌐
GitHub
github.com › MichalLytek › type-graphql › blob › master › docs › custom-decorators.md
type-graphql/docs/custom-decorators.md at master · MichalLytek/type-graphql
April 18, 2019 - Custom decorators are a great way to reduce the boilerplate and reuse some common logic between different resolvers. TypeGraphQL supports three kinds of custom decorators - method, resolver class and parameter.
Author   MichalLytek
🌐
GitHub
github.com › Quramy › graphql-decorator
GitHub - Quramy/graphql-decorator
Helps to build GraphQL schema with TypeScript. ... Decorators(@ObjectType, @Schema, @NonNull, and more...) corresponding to GraphQL type system.
Starred by 42 users
Forked by 21 users
Languages   TypeScript 99.3% | Shell 0.7% | TypeScript 99.3% | Shell 0.7%
🌐
Typegraphql
typegraphql.com › docs › extensions.html
Extensions · TypeGraphQL
Annotating schema types or fields with a custom metadata, that can be then used at runtime by middlewares or resolvers, is a really powerful and useful feature. For such use cases, TypeGraphQL provides the @Extensions decorator, which adds the data we defined to the extensions property of the ...
🌐
Nearform
formidable.com › blog › 2021 › typegraphql
Developing GraphQL APIs Using TypeGraphQL | Nearform
May 1, 2026 - In a single class, we have defined a GraphQL type and an entity. Using decorators, we can generate database columns, add to GraphQL types, or just have them as simple fields if no decorator is added.
Find elsewhere
🌐
Openbase
openbase.com › js › graphql-schema-decorator › documentation
graphql-schema-decorator: Documentation | Openbase
This project was discontinued and will not be updated anymore. We recommend using type-graphql, that covers most of this project's features and is being constantly updated and maintained. This package makes possible the use of decorators to define a GraphQL schema.
🌐
npm
npmjs.com › package › graphql-schema-decorator
graphql-schema-decorator - npm
March 9, 2020 - You can declare a GraphQL schema class with @Schema, @Query and @Mutation decorators. ... A schema class should a field annotated by @Query, which represents that the type of this filed will be a root query of GraphQL.
      » npm install graphql-schema-decorator
    
Published   Mar 09, 2020
Version   1.0.0
Author   Quramy
🌐
GitHub
github.com › tenry92 › graphql-decorators
GitHub - tenry92/graphql-decorators: GraphQL decorators for TypeScript.
This package provides useful TypeScript decorators for easy creation of GraphQL types and inputs as well as controllers for reading and writing data.
Author   tenry92
🌐
GitHub
github.com › indigotech › graphql-schema-decorator
GitHub - indigotech/graphql-schema-decorator
This project was discontinued and will not be updated anymore. We recommend using type-graphql, that covers most of this project's features and is being constantly updated and maintained. This package makes possible the use of decorators to define a GraphQL schema.
Starred by 38 users
Forked by 11 users
Languages   TypeScript 99.8% | Shell 0.2% | TypeScript 99.8% | Shell 0.2%
🌐
Telerik
telerik.com › blogs › introduction-typegraphql
Introduction to TypeGraphQL
July 26, 2024 - In the above example, we define the GraphQL object type for a User using TypeScript classes, which enhances type safety and maintainability. Each field of the User object is defined with a @Field decorator, which describes the type of data (such as ID, String, etc.) and whether it is nullable or not.
🌐
Medium
medium.com › @joshua.thomas.bird › using-decorators-to-automatically-generate-graphql-type-definitions-2d2e9a11323d
Using Decorators to Automatically Generate GraphQL Type Definitions | by Joshua Bird | Medium
December 11, 2022 - This code defines the graphqlResolver decorator and a MyClass class with a decorated myMethod method. The graphqlResolver decorator adds the method to the graphqlResolverMap and generates a type definition for the method.
🌐
Ts.ED
tsed.dev › tutorials › graphql-typegraphql.html
TypeGraphQL | Ts.ED a modern Node.js/Bun.js framework built with TypeScript on top of Express.js/Koa.js/Fastify.js/CLI/AWS
May 28, 2026 - Although TypeGraphQL is data-layer library agnostic, it integrates well with other decorator-based libraries, like TypeORM, sequelize-typescript or Typegoose. ... npm install --save @tsed/apollo graphql type-graphql @apollo/server ...
🌐
LogRocket
blog.logrocket.com › home › how to integrate typescript with graphql using typegraphql
How to integrate TypeScript with GraphQL using TypeGraphQL - LogRocket Blog
June 18, 2024 - Additionally, we’re importing both the Property decorator and the getModelForClass method from the @typegoose/typegoose package. The PropertyDecorator is used for setting properties in a class, without which it is just a type and will not be in the final model. Int and ID are aliases for three basic GraphQL scalars, and the getModelForClass method is used to get a model for a given class.
🌐
GitHub
github.com › MichalLytek › type-graphql › blob › master › docs › resolvers.md
type-graphql/docs/resolvers.md at master · MichalLytek/type-graphql
September 22, 2020 - Besides declaring GraphQL's object types, TypeGraphQL allows us to easily create queries, mutations and field resolvers - like normal class methods, similar to REST controllers in frameworks like Java Spring, .NET Web API or TypeScript routing-controllers. First we create the resolver class and annotate it with the @Resolver() decorator.
Author   MichalLytek