New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scripts to upload and delete mock data for DORA dashboard #49
Conversation
* Creates endpoints for Hasura mutations in resources * Run promises to create endpoints in parallel * Updates queries/endpoints only if needed * Prettify graphql files * Only adds query/endpoint if missing * Fix ts formatting issues Co-authored-by: Matthew Tovbin <tovbinm@users.noreply.github.com>
@@ -3,6 +3,7 @@ mutation insert_cicd_Artifact( | |||
$data_artifact_id: String! | |||
$data_artifact_organization: String! | |||
$data_artifact_source: String! | |||
$data_origin: String! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ypc-faros Does adding the origin as a mandatory field break the CLI scripts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this will be a breaking change for events CLI. Maybe just make optional?
Let's move the the code from |
Ummm, fine by me but as |
Sure, just not in |
Signed-off-by: Chalenge Masekera <chalenge@faros.ai>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see a linter, compiler option and packaging info in mock-data
. Do we need them here as well given we probably have similar ones in init
?
@thomas-gerber you typically have these defined separately per project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Can you make the endpoint file names all lowercase? (e.g., delete_cicd_Organization.gql => delete_cicd_organization.gql)
Signed-off-by: Chalenge Masekera <chalenge@faros.ai>
mock-data/src/index.ts
Outdated
|
||
import {MockData} from './mockdata'; | ||
|
||
const USAGE = 'Usage: node index.js <upload> | <delete> <hasura url> '; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: | => <upload | delete>
Signed-off-by: Chalenge Masekera <chalenge@faros.ai>
Add scripts to upload and delete mock data for DORA dashboard.
Ensure you are running the latest version of Faros CE.
From root directory
Then get into the mock-data directory and install dependencies
Usage
Upload data
Deleting data uploaded by script
Use
-u
flag to specify Hasura service url if using a different endpoint