-
Notifications
You must be signed in to change notification settings - Fork 579
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(apollo-usage-report): send Apollo clientName and clientVersion w…
…ith trace (#3448) * feat(apollo-usage-report): send Apollo clientName and clientVersion with trace * Inject version * Changeset --------- Co-authored-by: Tomas Kroupa <[email protected]> Co-authored-by: Arda TANRIKULU <[email protected]>
- Loading branch information
1 parent
ac2967d
commit 18fe916
Showing
9 changed files
with
147 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@graphql-yoga/plugin-apollo-usage-report": patch | ||
--- | ||
|
||
- Send Apollo `clientName`, `clientVersion` and `agentVersion` (agent name) with trace. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'graphql-yoga': minor | ||
--- | ||
|
||
Add `version` property to get version of Yoga |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { promises as fs } from 'node:fs'; | ||
import { globby } from 'globby'; | ||
import packageJson from '../package.json' with { type: 'json' }; | ||
|
||
const files = await globby(['dist/**/*.js']); | ||
|
||
const yogaVersion = packageJson.version; | ||
|
||
for (const file of files) { | ||
const content = await fs.readFile(file, 'utf-8'); | ||
await fs.writeFile(file, content.replace(/__YOGA_VERSION__/g, yogaVersion)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.