fix: add order to pagination types (#9471)

This commit is contained in:
Carlos R. L. Rodrigues
2024-10-04 09:57:44 -03:00
committed by GitHub
parent f7472a6fa6
commit d06ea6985d
2 changed files with 4 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import {
RemoteQueryGraph,
RemoteQueryObjectConfig,
} from "@medusajs/types"
import { IndexOrderBy } from "@medusajs/types/dist/index/query-config/query-input-config-order-by"
import { QueryContext, QueryFilter, isObject } from "@medusajs/utils"
import { parseAndAssignFilters } from "./parse-filters"
@@ -36,6 +37,7 @@ export function toRemoteQuery<const TEntity extends string>(
pagination?: {
skip?: number
take?: number
order?: IndexOrderBy<TEntity>
}
context?: Record<string, any>
},

View File

@@ -1,3 +1,4 @@
import { IndexOrderBy } from "../index/query-config/query-input-config-order-by"
import { ObjectToRemoteQueryFields } from "./object-to-remote-query-fields"
import { RemoteQueryEntryPoints } from "./remote-query-entry-points"
import { RemoteQueryFilters } from "./to-remote-query"
@@ -35,6 +36,7 @@ export type RemoteQueryInput<TEntry extends string> = {
pagination?: {
skip: number
take?: number
order?: IndexOrderBy<TEntry>
}
filters?: RemoteQueryFilters<TEntry>
context?: any