perch-query-builder icon indicating copy to clipboard operation
perch-query-builder copied to clipboard

Dynamically build TypeORM queries based on GraphQL queries for NestJS and TypeORM

Results 13 perch-query-builder issues
Sort by recently updated
recently updated
newest added

**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: ![image](https://user-images.githubusercontent.com/24193020/139121722-8f945e11-5e66-43e1-b401-9dab7ce97be8.png) ![image](https://user-images.githubusercontent.com/24193020/139121692-e030dbdf-a9b5-4b56-9b60-80abdff3e717.png) In console I'm getting an error: ![image](https://user-images.githubusercontent.com/24193020/139121846-3adc5022-8d31-4d77-aaff-cc284e286603.png) ![image](https://user-images.githubusercontent.com/24193020/139121900-502c9c57-297e-48d4-8e57-2163f2ce482f.png) 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...