Skip to content

Commit

Permalink
Skip any action on missing New Relic source segments. (#5307)
Browse files Browse the repository at this point in the history
* Skip any action on missing source segments.

* Changeset added.
  • Loading branch information
janos-mands authored Apr 17, 2023
1 parent bc7a042 commit f36c6c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/stupid-ducks-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-mesh/plugin-newrelic': patch
---

Avoiding operations on sourceSegment when it could not be created for onDelegate.
3 changes: 3 additions & 0 deletions packages/plugins/newrelic/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ export default function useMeshNewrelic(
null,
parentSegment,
);
if (!sourceSegment) {
return undefined;
}
if (options.includeResolverArgs) {
if (args) {
sourceSegment.addAttribute('args', JSON.stringify(args));
Expand Down

0 comments on commit f36c6c2

Please sign in to comment.