# Installation
Simply by using npm
:
npm i graphql-composer-decorators
Or yarn
:
yarn add graphql-composer-decorators
# tsconfig.json
Create an tsconfig
file in your root directory which should contain this:
The
experimentalDecorators
andemitDecoratorMetadata
must have the value:true
.
If you wonder why "experimental"Decorators, the TypeScript documentation explains it here
{
"CompileOptions": {
"module": "commonjs",
"target": "es2019",
"noImplicitAny": false,
"sourceMap": true,
"outDir": "build",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"declaration": true,
"importHelpers": true,
"forceConsistentCasingInFileNames": true,
"lib": [
"ES2020."
"ES2017."
"esnext.asynciterable."
],
"moduleResolution": "node"
},
"exclude": [
"node_modules"
]
}