Skip to content

Commit

Permalink
chore: query graph api (#9125)
Browse files Browse the repository at this point in the history
CLOSES: FRMW-2704

**What**
Re-structure the Query graph API as well as introduce dynamic typing from schemas on the filters and better handling of relation treatment for fields/filters inference

Co-authored-by: Adrien de Peretti <[email protected]>
  • Loading branch information
carlos-r-l-rodrigues and adrien2p authored Sep 16, 2024
1 parent 3e97a64 commit 8829f89
Show file tree
Hide file tree
Showing 21 changed files with 2,162 additions and 50 deletions.
4 changes: 2 additions & 2 deletions packages/core/modules-sdk/src/medusa-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ declare module "@medusajs/types" {
[ContainerRegistrationKeys.CONFIG_MODULE]: ConfigModule
[ContainerRegistrationKeys.PG_CONNECTION]: Knex<any>
[ContainerRegistrationKeys.REMOTE_QUERY]: RemoteQueryFunction
[ContainerRegistrationKeys.QUERY]: RemoteQueryFunction
[ContainerRegistrationKeys.QUERY]: Omit<RemoteQueryFunction, symbol>
[ContainerRegistrationKeys.LOGGER]: Logger
}
}
Expand Down Expand Up @@ -520,7 +520,7 @@ async function MedusaApp_({
onApplicationStart,
modules: allModules,
link: remoteLink,
query: createQuery(remoteQuery),
query: createQuery(remoteQuery) as any, // TODO: rm any once we remove the old RemoteQueryFunction and rely on the Query object instead,
entitiesMap: schema.getTypeMap(),
gqlSchema: schema,
notFound,
Expand Down
Loading

0 comments on commit 8829f89

Please sign in to comment.