typeorm-typedi-extensions | Dependency injection and service container integration | Dependency Injection library
kandi X-RAY | typeorm-typedi-extensions Summary
kandi X-RAY | typeorm-typedi-extensions Summary
This package provides decorators for TypeORM that can be used with TypeDI.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of typeorm-typedi-extensions
typeorm-typedi-extensions Key Features
typeorm-typedi-extensions Examples and Code Snippets
Community Discussions
Trending Discussions on typeorm-typedi-extensions
QUESTION
I'm working with a server app that uses both TypeORM and Type-GraphQL.
...ANSWER
Answered 2021-Oct-18 at 02:53If you want a value to be null, you should put it on both.
{ nullable: true }
in typeorm (@Entity
) means the database is permitted to store null
values. Otherwise, you can't even save an entity without defining that column.
{ nullable: true}
in type-graphql
(@Field
) means that the schema generated by TypeGraphQL
will permit that field to be null
. Otherwise, when querying, you would expect to potentially get an error of Cannot return null for non-nullable field EntityName.fieldName
.
To clarify, the GraphQL schema might look like:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install typeorm-typedi-extensions
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page