Skip to content

Commit

Permalink
[RUM-311] Add graphql property to resources (#162)
Browse files Browse the repository at this point in the history
* Add graphql property to resources

* Make payload optional and add variables to graphql
  • Loading branch information
louiszawadzki authored Sep 13, 2023
1 parent 221e41f commit 1c476e4
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
22 changes: 22 additions & 0 deletions lib/cjs/generated/rum.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,28 @@ export declare type RumResourceEvent = CommonProperties & ActionChildProperties
readonly type?: 'ad' | 'advertising' | 'analytics' | 'cdn' | 'content' | 'customer-success' | 'first party' | 'hosting' | 'marketing' | 'other' | 'social' | 'tag-manager' | 'utility' | 'video';
[k: string]: unknown;
};
/**
* GraphQL requests parameters
*/
readonly graphql?: {
/**
* Type of the GraphQL operation
*/
readonly operationType: 'query' | 'mutation' | 'subscription';
/**
* Name of the GraphQL operation
*/
readonly operationName?: string;
/**
* Content of the GraphQL operation
*/
payload?: string;
/**
* String representation of the operation variables
*/
variables?: string;
[k: string]: unknown;
};
[k: string]: unknown;
};
/**
Expand Down
22 changes: 22 additions & 0 deletions lib/esm/generated/rum.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,28 @@ export declare type RumResourceEvent = CommonProperties & ActionChildProperties
readonly type?: 'ad' | 'advertising' | 'analytics' | 'cdn' | 'content' | 'customer-success' | 'first party' | 'hosting' | 'marketing' | 'other' | 'social' | 'tag-manager' | 'utility' | 'video';
[k: string]: unknown;
};
/**
* GraphQL requests parameters
*/
readonly graphql?: {
/**
* Type of the GraphQL operation
*/
readonly operationType: 'query' | 'mutation' | 'subscription';
/**
* Name of the GraphQL operation
*/
readonly operationName?: string;
/**
* Content of the GraphQL operation
*/
payload?: string;
/**
* String representation of the operation variables
*/
variables?: string;
[k: string]: unknown;
};
[k: string]: unknown;
};
/**
Expand Down
29 changes: 29 additions & 0 deletions schemas/rum/resource-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,35 @@
}
},
"readOnly": true
},
"graphql": {
"type": "object",
"description": "GraphQL requests parameters",
"required": ["operationType"],
"properties": {
"operationType": {
"type": "string",
"description": "Type of the GraphQL operation",
"enum": ["query", "mutation", "subscription"],
"readOnly": true
},
"operationName": {
"type": "string",
"description": "Name of the GraphQL operation",
"readOnly": true
},
"payload": {
"type": "string",
"description": "Content of the GraphQL operation",
"readOnly": false
},
"variables": {
"type": "string",
"description": "String representation of the operation variables",
"readOnly": false
}
},
"readOnly": true
}
},
"readOnly": true
Expand Down

0 comments on commit 1c476e4

Please sign in to comment.