Skip to content

Commit

Permalink
feat(sequelize): More clean up of code
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-martin committed Apr 29, 2020
1 parent 784b571 commit a72bce5
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- run: docker-compose -f ./examples/nest-graphql-typeorm/docker-compose.yml up -d
- run: docker-compose -f ./examples/federation/docker-compose.yml up -d
- run: docker-compose -f ./examples/nest-graphql-typeorm-soft-delete/docker-compose.yml up -d
- run: docker-compose -f ./examples/nest-graphql-sequelize/docker-compose.yml up -d
- run: npm ci
- run: npm run bootstrap -- --ignore-scripts
- run: npm run build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Test } from '@nestjs/testing';
import request from 'supertest';
import { INestApplication, ValidationPipe } from '@nestjs/common';
import { Connection } from 'typeorm';
import { Sequelize } from 'sequelize-typescript';
import { AppModule } from '../src/app.module';
import { refresh } from './fixtures';
Expand Down Expand Up @@ -30,7 +29,7 @@ describe('SubTaskResolver (sequelize - e2e)', () => {
await refresh(app.get(Sequelize));
});

afterAll(() => refresh(app.get(Connection)));
afterAll(() => refresh(app.get(Sequelize)));

const subTasks = [
{ id: '1', title: 'Create Nest App - Sub Task 1', completed: true, description: null, todoItemId: 1 },
Expand Down
2 changes: 1 addition & 1 deletion examples/nest-graphql-sequelize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@nestjs/core": "7.0.9",
"@nestjs/graphql": "7.3.4",
"@nestjs/platform-express": "7.0.9",
"@nestjs/typeorm": "7.0.0",
"@nestjs/sequelize": "0.1.0",
"apollo-server-express": "2.12.0",
"graphql": "15.0.0",
"graphql-tools": "5.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// this is needed to create a query builder in typeorm :(
// this is needed to create a query builder in sequelize :(
import { Sequelize } from 'sequelize-typescript';
import { TestEntityTestRelationEntity } from './test-entity-test-relation.entity';
import { TestRelation } from './test-relation.entity';
Expand Down
2 changes: 1 addition & 1 deletion packages/query-sequelize/src/query/filter-query.builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { WhereBuilder } from './where.builder';
/**
* @internal
*
* Interface that for Typeorm query builders that are sortable.
* Interface that for `sequelize` query builders that are sortable.
*/
interface Sortable<Entity> {
order?: Order;
Expand Down
2 changes: 0 additions & 2 deletions packages/query-sequelize/src/query/where.builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export class WhereBuilder<Entity> {

/**
* Builds a WHERE clause from a Filter.
* @param where - the `typeorm` WhereExpression
* @param filter - the filter to build the WHERE clause from.
*/
build(filter: Filter<Entity>): WhereOptions {
Expand Down Expand Up @@ -40,7 +39,6 @@ export class WhereBuilder<Entity> {

/**
* Creates field comparisons from a filter. This method will ignore and/or properties.
* @param where - the `typeorm` WhereExpression
* @param filter - the filter with fields to create comparisons for.
*/
private filterFields(filter: Filter<Entity>): WhereOptions | undefined {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { FilterQueryBuilder } from '../query';
import { RelationQueryService } from './relation-query.service';

/**
* Base class for all query services that use a `typeorm` Repository.
* Base class for all query services that use a `sequelize` Model.
*
* @example
*
Expand Down

0 comments on commit a72bce5

Please sign in to comment.