Skip to content
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

Merged
merged 10 commits into from
May 1, 2023
Merged

Utils for constructing v2 mutations #125

merged 10 commits into from
May 1, 2023

Conversation

willmarks
Copy link
Contributor

@willmarks willmarks commented Apr 5, 2023

Description

Some helpers when constructing v2 mutations.

Type of change

  • Bug fix
  • New feature
  • Breaking change

@@ -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",
Copy link
Contributor Author

@willmarks willmarks Apr 5, 2023

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?

@willmarks
Copy link
Contributor Author

Let me know if you think these would be helpful to include for people trying to build v2 mutations.

@willmarks willmarks marked this pull request as ready for review April 10, 2023 22:40
@tovbinm tovbinm requested review from eskrm and cjwooo and removed request for tovbinm April 11, 2023 22:36
Copy link
Contributor

@ted-faros ted-faros left a 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?

Copy link
Contributor

@ted-faros ted-faros left a 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

Comment on lines +34 to +40
key: {
uid: '<cicd_Build>',
pipeline: qb.ref(pipeline),
},
body: {
name: '<build_name>',
},
Copy link
Contributor Author

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.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented May 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@willmarks willmarks merged commit 74e66e1 into main May 1, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants