-
Notifications
You must be signed in to change notification settings - Fork 2
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
Utils for constructing v2 mutations #125
Conversation
@@ -15,7 +15,7 @@ | |||
"scripts": { | |||
"build": "tsc -p src", | |||
"clean": "rm -rf lib node_modules out", | |||
"fix": "npm run lint -- --fix && npm run pretty", | |||
"fix": "npm run lint -- --fix", |
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.
npm run pretty
messes stuff up so that it no longer passes lint... maybe its only an issue for me? If not, should I remove the pretty
command as well?
Let me know if you think these would be helpful to include for people trying to build v2 mutations. |
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.
@willmarks can you provide some sort of example usage in the form of docs or test?
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.
thanks for the usage info
key: { | ||
uid: '<cicd_Build>', | ||
pipeline: qb.ref(pipeline), | ||
}, | ||
body: { | ||
name: '<build_name>', | ||
}, |
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.
The reason for the separation of key
and body
was so we could only write the key fields in the situation where the model is a reference and should only result in phantom if the model is not already there. If we don't mind phantoms having non-key fields populated (e.g. build.name being populated) we could combine the key
and body
objects into a fields
object that contained all fields.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Description
Some helpers when constructing v2 mutations.
Type of change