mirror of
https://github.com/vale981/apollo-server
synced 2025-03-05 17:51:40 -05:00
Make it more clear that generateClientInfo
is an experimental API.
The `generateClientInfo` API, used to set client identification attributes within traces, is an experimental API and is subject to removal or change in a future (major) Apollo Server release. Ref: #1631
This commit is contained in:
parent
81c46421a9
commit
b90ccc2e8b
3 changed files with 10 additions and 17 deletions
|
@ -10,8 +10,8 @@
|
|||
|
||||
- Updated the google-cloud-functions package to handle null paths [PR #1674](https://github.com/apollographql/apollo-server/pull/1674)
|
||||
- Update link inside Authentication Docs [PR #1682](https://github.com/apollographql/apollo-server/pull/1682)
|
||||
- Provide ability to specify client info in traces [#1631](https://github.com/apollographql/apollo-server/pull/1631)
|
||||
- Fix making sure all headers are getting reported to Engine properly when using `privateHeaders` [PR #1689](https://github.com/apollographql/apollo-server/pull/1689)
|
||||
- _(experimental, subject to change/removal)_ Provide ability to specify client info in traces [#1631](https://github.com/apollographql/apollo-server/pull/1631)
|
||||
|
||||
### v2.0.8
|
||||
|
||||
|
|
|
@ -365,13 +365,3 @@ addMockFunctionsToSchema({
|
|||
* `maskErrorDetails`: boolean
|
||||
|
||||
Set to true to remove error details from the traces sent to Apollo's servers. Defaults to false.
|
||||
|
||||
* generateClientInfo?: (o: { context: any, extensions?: Record<string, any>}) => ClientInfo;
|
||||
|
||||
Creates the client information that is attached to the traces sent to the
|
||||
Apollo backend. The context field is the execution context passed to the
|
||||
resolvers and the extensions field corresponds to the same value in the POST
|
||||
body or GET parameters. `ClientInfo` contains fields for `clientName` and
|
||||
`clientVersion`, which are both optional. The default generation copies the
|
||||
respective fields from `extensions.clientInfo`. If `clientName` or
|
||||
`clientVersion` is not present, the values are set to the empty string.
|
||||
|
|
|
@ -88,18 +88,21 @@ export interface EngineReportingOptions {
|
|||
sendReportsImmediately?: boolean;
|
||||
// To remove the error message from traces, set this to true. Defaults to false
|
||||
maskErrorDetails?: boolean;
|
||||
// Creates the client information attached to the traces sent to the Apollo
|
||||
// backend
|
||||
|
||||
/**
|
||||
* (Experimental) Creates the client information for operation traces.
|
||||
*
|
||||
* @remarks This is experimental and subject to change or removal.
|
||||
*
|
||||
* @private
|
||||
*
|
||||
*/
|
||||
generateClientInfo?: (
|
||||
o: {
|
||||
context: any;
|
||||
extensions?: Record<string, any>;
|
||||
},
|
||||
) => ClientInfo;
|
||||
|
||||
// XXX Provide a way to set client_name, client_version, client_address,
|
||||
// service, and service_version fields. They are currently not revealed in the
|
||||
// Engine frontend app.
|
||||
}
|
||||
|
||||
const REPORT_HEADER = new ReportHeader({
|
||||
|
|
Loading…
Add table
Reference in a new issue