Skip to content

Commit

Permalink
fix: endpoint service query options merge, update typeorm json query
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewPattell committed Mar 16, 2023
1 parent e453a03 commit 71bf26a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@lomray/microservice-remote-middleware": "^1.7.6",
"@lomray/microservices-client-api": "^2.9.0",
"@lomray/microservices-types": "^1.9.1",
"@lomray/typeorm-json-query": "^2.3.1",
"@lomray/typeorm-json-query": "^2.4.0",
"@opentelemetry/api": "^1.4.0",
"@opentelemetry/exporter-metrics-otlp-http": "^0.35.1",
"@opentelemetry/exporter-trace-otlp-http": "^0.35.1",
Expand Down
10 changes: 5 additions & 5 deletions src/services/endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1103,10 +1103,10 @@ class Endpoint {
async function (params, options) {
const { repository, queryOptions, cache } = countOptions();
const typeQuery = createTypeQuery(repository.createQueryBuilder(), params, {
...queryOptions,
relationOptions: ['*'],
isDisableOrderBy: true,
isDisableAttributes: true,
...queryOptions,
});
const result = await handler(typeQuery, params, options);
const { hasRemoved } = params;
Expand Down Expand Up @@ -1215,9 +1215,9 @@ class Endpoint {
async function (params, options) {
const { repository, queryOptions, cache } = viewOptions();
const typeQuery = createTypeQuery(repository.createQueryBuilder(), params, {
...queryOptions,
isDisableOrderBy: true,
isDisablePagination: true,
...queryOptions,
});
const result = await handler(typeQuery, params, options);

Expand Down Expand Up @@ -1298,11 +1298,11 @@ class Endpoint {
...(params.payload?.authorization?.filter?.methodOptions ?? {}),
};
const typeQuery = createTypeQuery(repository.createQueryBuilder(), params, {
...queryOptions,
relationOptions: ['*'],
isDisableOrderBy: true,
isDisablePagination: true,
isDisableAttributes: true,
...queryOptions,
});
const primaryKeys = new Set(
repository.metadata.primaryColumns.map(({ propertyName }) => propertyName),
Expand Down Expand Up @@ -1400,11 +1400,11 @@ class Endpoint {
shouldResetCache,
} = { ...removeOptions(), ...(params.payload?.authorization?.filter?.methodOptions ?? {}) };
const typeQuery = createTypeQuery(repository.createQueryBuilder(), params, {
...queryOptions,
relationOptions: ['*'],
isDisableOrderBy: true,
isDisableAttributes: true,
isDisablePagination: true,
...queryOptions,
});
const result = await handler(typeQuery, params, options);
const defaultParams = {
Expand Down Expand Up @@ -1457,11 +1457,11 @@ class Endpoint {
...(params.payload?.authorization?.filter?.methodOptions ?? {}),
};
const typeQuery = createTypeQuery(repository.createQueryBuilder(), params, {
...queryOptions,
relationOptions: ['*'],
isDisableOrderBy: true,
isDisableAttributes: true,
isDisablePagination: true,
...queryOptions,
});
const result = await handler(typeQuery, params, options);
const defaultParams = { isAllowMultiple, shouldResetCache };
Expand Down

0 comments on commit 71bf26a

Please sign in to comment.