chore: query graph api (#9125)
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 <25098370+adrien2p@users.noreply.github.com>
This commit is contained in:
1 parent
3e97a64b21
commit
8829f89402
21 files changed
+2164
-52
No files matched your search
@@ -1,14 +1,14 @@
|
||||
import { snakeCase } from "lodash"
|
||||
import { NodeSDK } from "@opentelemetry/sdk-node"
|
||||
import { Resource } from "@opentelemetry/resources"
|
||||
import { Query, RoutesLoader, Tracer } from "@medusajs/framework"
|
||||
import { SpanStatusCode } from "@opentelemetry/api"
|
||||
import { RoutesLoader, Tracer, Query } from "@medusajs/framework"
|
||||
import {
|
||||
type SpanExporter,
|
||||
SimpleSpanProcessor,
|
||||
} from "@opentelemetry/sdk-trace-node"
|
||||
import { PgInstrumentation } from "@opentelemetry/instrumentation-pg"
|
||||
import type { Instrumentation } from "@opentelemetry/instrumentation"
|
||||
import { PgInstrumentation } from "@opentelemetry/instrumentation-pg"
|
||||
import { Resource } from "@opentelemetry/resources"
|
||||
import { NodeSDK } from "@opentelemetry/sdk-node"
|
||||
import {
|
||||
SimpleSpanProcessor,
|
||||
type SpanExporter,
|
||||
} from "@opentelemetry/sdk-trace-node"
|
||||
import { snakeCase } from "lodash"
|
||||
|
||||
import start from "../commands/start"
|
||||
|
||||
@@ -132,7 +132,7 @@ export function instrumentRemoteQuery() {
|
||||
|
||||
Query.instrument.graphQuery(async function (queryFn, queryOptions) {
|
||||
return await QueryTracer.trace(
|
||||
`query.graph: ${queryOptions.entryPoint}`,
|
||||
`query.graph: ${queryOptions.entity}`,
|
||||
async (span) => {
|
||||
span.setAttributes({
|
||||
"query.fields": queryOptions.fields,
|
||||
|
||||
Reference in new issue
Block a user