Skip to content

Commit 48d2d70

Browse files
committed
use apollo-inline-trace plugin for yoga
1 parent 6d40631 commit 48d2d70

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

packages/http/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@graphql-mesh/runtime": "0.44.18",
3535
"@graphql-mesh/utils": "0.41.19",
3636
"@graphql-mesh/types": "0.84.8",
37+
"@graphql-yoga/plugin-apollo-inline-trace": "^1.0.0-next.3",
3738
"graphql-yoga": "3.0.0-next.3",
3839
"itty-router": "2.6.6",
3940
"itty-router-extras": "0.4.2",

packages/http/src/graphqlHandler.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { MeshInstance } from '@graphql-mesh/runtime';
22
import { CORSOptions, createYoga, useLogger } from 'graphql-yoga';
3+
import { useApolloInlineTrace } from '@graphql-yoga/plugin-apollo-inline-trace';
34

45
export const graphqlHandler = (
56
mesh$: Promise<MeshInstance>,
@@ -14,6 +15,7 @@ export const graphqlHandler = (
1415
validationCache: false,
1516
plugins: [
1617
...mesh.plugins,
18+
useApolloInlineTrace(),
1719
useLogger({
1820
skipIntrospection: true,
1921
logFn: (eventName, { args }) => {

yarn.lock

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2542,6 +2542,14 @@
25422542
resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.1.1.tgz#076d78ce99822258cf813ecc1e7fa460fa74d052"
25432543
integrity sha512-NQ17ii0rK1b34VZonlmT2QMJFI70m0TRwbknO/ihlbatXyaktDhN/98vBiUU6kNBPljqGqyIrl2T4nY2RpFANg==
25442544

2545+
"@graphql-yoga/plugin-apollo-inline-trace@^1.0.0-next.3":
2546+
version "1.0.0-next.3"
2547+
resolved "https://registry.yarnpkg.com/@graphql-yoga/plugin-apollo-inline-trace/-/plugin-apollo-inline-trace-1.0.0-next.3.tgz#45dadf9564cc5249e84d2ada3956f0ae25dbeb45"
2548+
integrity sha512-+xRoVOYzq2rES9hGxYRIqWYuKbmcA0z+rP1s3zz/VPZFg/SFgJ9JXFf5iN+JriIaLToAYJgoxG3uZ5AILtn5gA==
2549+
dependencies:
2550+
"@whatwg-node/fetch" "0.4.6"
2551+
apollo-reporting-protobuf "^3.3.2"
2552+
25452553
"@graphql-yoga/subscription@^3.0.0-next.0":
25462554
version "3.0.0-next.0"
25472555
resolved "https://registry.yarnpkg.com/@graphql-yoga/subscription/-/subscription-3.0.0-next.0.tgz#fce94b540ec8837c7667e24b556b70553ccb558b"
@@ -5751,6 +5759,13 @@ apollo-reporting-protobuf@^0.8.0, "apollo-reporting-protobuf@^0.8.0 || ^3.0.0":
57515759
dependencies:
57525760
"@apollo/protobufjs" "1.2.2"
57535761

5762+
apollo-reporting-protobuf@^3.3.2:
5763+
version "3.3.2"
5764+
resolved "https://registry.yarnpkg.com/apollo-reporting-protobuf/-/apollo-reporting-protobuf-3.3.2.tgz#2078c53d3140bc6221c6040c5326623e0c21c8d4"
5765+
integrity sha512-j1tx9tmkVdsLt1UPzBrvz90PdjAeKW157WxGn+aXlnnGfVjZLIRXX3x5t1NWtXvB7rVaAsLLILLtDHW382TSoQ==
5766+
dependencies:
5767+
"@apollo/protobufjs" "1.2.4"
5768+
57545769
apollo-server-caching@^0.7.0:
57555770
version "0.7.0"
57565771
resolved "https://registry.yarnpkg.com/apollo-server-caching/-/apollo-server-caching-0.7.0.tgz#e6d1e68e3bb571cba63a61f60b434fb771c6ff39"

0 commit comments

Comments
 (0)