perch-query-builder
perch-query-builder copied to clipboard
Dynamically build TypeORM queries based on GraphQL queries for NestJS and TypeORM
**Describe the bug** when I try to pass argument to "PerchQueryBuilder" I got a error given bellow - Argument of type 'import("/Users/dev/AnchorBlock/anchorblock-dashboard-backend/node_modules/typeorm/repository/Repository").Repository' is not assignable to parameter of type 'import("/Users/dev/AnchorBlock/anchorblock-dashboard-backend/node_modules/perch-query-builder/node_modules/typeorm/repository/Repository").Repository'....
**Describe the bug** Hello, I recently updated my nestjs' project by following the official guide available [here](https://docs.nestjs.com/graphql/quick-start). Sadly, it looks like the new type definition of Graphql is not compatible...
**Describe the bug** My code is:   In console I'm getting an error:   In query it's working perfectly.
NestJs + GraphQl + TypeOrm and resolver Query : ` @Query(() => [Department]) async getDepartments( @Args() args: DepartmentArgs, @Args() orderByArgs: OrderByArgs, // @Args() paginationArgs: PaginationArgs, @Info() info: GraphQLResolveInfo, ): Promise...
This is related to the (closed) issue https://github.com/wesleyyoung/perch-query-builder/issues/8. This PR implements my proposal of a `@SelectAlways()` decorator for columns. I found that if using, for example, an `@AfterLoad()` that depends...
Closes #10: a `rootField` argument. It works perfectly fine, however, if you think the implementation is not a good fit for the library, I'd appreciate an alternative way to overcome...
**Describe the bug** I have these entities: ```ts @Entity() export class PrimaryEntity extends BaseEntity { @PrimaryColumn() id: string; @OneToOne(() => SubEntity, subEntity => subEntity.entity) sub: SubEntity; } @Entity() export class...
**Is your feature request related to a problem? Please describe.** I have a GraphQL model that uses a union type, however, TypeORM entities do not support this kind of relation....
Fixes #9 This PR makes it so that the primary columns are always selected. This will prevent joined relations from becoming null if no table column is selected
Fixes #11 This makes it so that the recursive query builder also checks for all sub-fields whether the graphql field is actually part of the entity's propertiesMap. Line was taken...