Create GraphQL APIs for Google Cloud Logging data
Problem Statement
Develop GraphQL APIs to manage Google Cloud Logging configuration data, which helps in creating, updating, and deleting the configurations.
Implementation plan
-
Create a new GraphQL type corresponding to
AuditEvents::GoogleCloudLoggingConfiguration
model. it should have the following- groupId: ID of the group.
- googleProjectId: Google Cloud project ID.
- clientEmail: Service account client email.
- logName: Name of the log in Google Cloud Logging.
- privateKey: Private key of the Service account.
-
Implement a GraphQL query to fetch configurations for a group. like below
query seeAuditEventDestinations {
group(fullPath: "flightjs") {
id
googleCloudLoggingConfigurations {
nodes {
googleProjectId,
clientEmail,
logName,
privateKey,
}
}
}
}
-
Implement a GraphQL mutation to create googleCloudLoggingConfigurations. User should only be able to create this on top level groups.
-
Implement update and delete mutations.
-
Also add audit events for each action.
Edited by Harsimar Sandhu