Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregated optimization changes #2744

Merged
merged 24 commits into from
Mar 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4034445
fix(core): self-referencing relations `Not unique table/alias`
monrostar Mar 15, 2024
16cfc07
perf(core): upgrade sql requests for more performant memory usage wit…
monrostar Mar 15, 2024
469a02b
perf(core): Upgrade EntityHydrator to add more performance to any hyd…
monrostar Mar 15, 2024
10c0798
fix(core): update self-related manual joins with deep eager relations
monrostar Mar 16, 2024
4824d86
chore(core): clean up code
monrostar Mar 16, 2024
5eb6391
fix(core): update test cases for new TestEntities order
monrostar Mar 16, 2024
0750065
feat(core): optimization for assignToChannels method
monrostar Mar 16, 2024
dc463ba
feat(core): fix changes for new getAssignedEntityChannels method
monrostar Mar 16, 2024
4486cd2
Merge branch 'perf/performance-improvement-in-entity-hydrator' into f…
monrostar Mar 16, 2024
949dc54
Merge branch 'perf/optimize-assign-to-channels' into feat/aggregated-prs
monrostar Mar 16, 2024
85821b7
Merge branch 'perf/product-soft-delete-performance-update' into feat/…
monrostar Mar 16, 2024
c376eef
feat(core): add optimization into findOneInChannel and more refactoring
monrostar Mar 16, 2024
661c2e9
perf(core): optimize translatable-saver.ts query to get existingTrans…
monrostar Mar 17, 2024
eaca1c9
fix(core): Added processing of deeply nested relations that lack Reve…
monrostar Mar 17, 2024
11e3904
fix(core): fix condition for tree type of metadata in list-query-builder
monrostar Mar 17, 2024
d1494bd
Merge branch 'minor' into feat/aggregated-prs
monrostar Mar 19, 2024
c92bf6d
feat(core): Added edge case handling with customFields as well as dep…
monrostar Mar 19, 2024
b54f0f0
feat(core): Clean up code and remove joinEagerRelations helper
monrostar Mar 19, 2024
7af0d4a
feat(core): Fix import in the unit test case
monrostar Mar 19, 2024
5f836b9
feat(core): Fix import in the unit test case
monrostar Mar 19, 2024
0dfb4f6
feat(core): Fix condition for tree type of all relation entities
monrostar Mar 19, 2024
8a15a26
chore(core): Code style fixes
monrostar Mar 20, 2024
d6c50d5
docs(core): Update docs for joinTreeRelationsDynamically
monrostar Mar 20, 2024
a444894
chore(core): Remove unused import
monrostar Mar 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(core): update test cases for new TestEntities order
monrostar committed Mar 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 5eb6391197781fef5108b12a36fe1ace0bd2c17b
15 changes: 8 additions & 7 deletions packages/core/e2e/list-query-builder.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ import { ListQueryPlugin } from './fixtures/test-plugins/list-query-plugin';
import { LanguageCode, SortOrder } from './graphql/generated-e2e-admin-types';
import { assertThrowsWithMessage } from './utils/assert-throws-with-message';
import { fixPostgresTimezone } from './utils/fix-pg-timezone';
import { sortById } from './utils/test-order-utils';

fixPostgresTimezone();

@@ -55,14 +56,14 @@ describe('ListQueryBuilder', () => {

expect(testEntities.totalItems).toBe(6);
expect(getItemLabels(testEntities.items)).toEqual(['A', 'B', 'C', 'D', 'E', 'F']);
expect(testEntities.items.map((i: any) => i.name)).toEqual([
expect(testEntities.items.map((i: any) => i.name)).toEqual(expect.arrayContaining([
'apple',
'bike',
'cake',
'dog',
'egg',
'baum', // if default en lang does not exist, use next available lang
]);
]));
});

it('all de', async () => {
@@ -76,14 +77,14 @@ describe('ListQueryBuilder', () => {

expect(testEntities.totalItems).toBe(6);
expect(getItemLabels(testEntities.items)).toEqual(['A', 'B', 'C', 'D', 'E', 'F']);
expect(testEntities.items.map((i: any) => i.name)).toEqual([
expect(testEntities.items.map((i: any) => i.name)).toEqual(expect.arrayContaining([
'apfel',
'fahrrad',
'kuchen',
'hund',
'egg', // falls back to en translation when de doesn't exist
'baum',
]);
]));
});

it('take', async () => {
@@ -1207,9 +1208,9 @@ describe('ListQueryBuilder', () => {
// https://github.com/vendure-ecommerce/vendure/issues/1586
it('using the getMany() of the resulting QueryBuilder', async () => {
const { testEntitiesGetMany } = await adminClient.query(GET_ARRAY_LIST, {});
expect(testEntitiesGetMany.sort((a: any, b: any) => a.id - b.id).map((x: any) => x.price)).toEqual([
11, 9, 22, 14, 13, 33,
]);
const actualPrices = testEntitiesGetMany.sort(sortById).map((x: any) => x.price).sort((a: number, b: number) => a - b);
const expectedPrices = [11, 9, 22, 14, 13, 33].sort((a, b) => a - b);
expect(actualPrices).toEqual(expectedPrices);
});

// https://github.com/vendure-ecommerce/vendure/issues/1611