generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 10
feat: don't generate keys in update input object #71
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hm23
approved these changes
Apr 17, 2023
johannes-vogel
added a commit
that referenced
this pull request
May 4, 2023
* update changelog (#65) * fix version for hotfix * Add version 0.5.0 changelog section * Bump version in package.json to 0.5.0 * feat: improve handling of various return types from custom handlers (#69) * Add tests for handling different return types from custom handlers * Fix test description typo * Return 1 for objects and array.length for arrays set in delete custom handlers * Only wrap objects in arrays instead of all types in CUD resolvers * Use mergedResults instead of result in update * Use isPlainObject helper instead of typeof object * Add is not array check to isPlainObject helper * Improve comment * Add changelog entries * Improve changelog entries * Return {} instead of [] for no update needed guard clause * Changelog entry wording * Fix and improve changelog entries * Tests: prepare for changes in sap/cds/common (`minorUnit`) (#70) The persisted test schema for `bookshop-graphql` fails with the upcoming new field `minorUnit` in `sap.common.Currencies. As a fix, allow the schema to specify their min. cds version. Skip them if they fail this test. * Delete LICENSES directory * feat: don't generate keys in update input object (#71) * Don't generate keys in update input object * Regenerate schemas * Add changelog entry * Add todos * Move suffix const into function * Nested input objects in update are create input objects * Omit generation of update input argument if input object has no fields * Regenerate schemas * Don't generate CUD mutation fields when args are missing * Improve changelog entry wording * Improve readability of object creation * Ensure mutation related fields are not generated if subfields are empty * Extract creation of CUD fields to separate functions * Move creation of args input objects into functions since they are cached * Reorder vars and comments * Prettier format * fix: aligned `cds.Request` instantiation with other protocols (#61) * Add test for HTTP header access in custom handlers * Add cds.request custom handler tests for CUD * Use cds.Request and srv.dispatch instead of srv.run * Pass req directly instead of wrapped in context * Add changelog entry * Use `@sap/cds/lib` instead of `@sap/cds` * Rename request test project to cds.Request * Add tests for res in custom handlers * Add res to context and cds.Request initialization * Move changelog entry to latest planned release * Deconstruct context in function args * Improve changelog entry * Filter is mandatory for update und delete mutation * revert * Update CHANGELOG.md Co-authored-by: Marcel Schwarz <marcel.schwarz@sap.com> * fix * feat: allow services that are not instances of `cds.ApplicationService` (#72) * Allow services that are not instances of cds.ApplicationService * Add changelog entry * Improve changelog entry * Improve changelog entry * add changelog date (#74) * update changelog date --------- Co-authored-by: Marcel Schwarz <marcel.schwarz@sap.com> Co-authored-by: Christian Georgi <chgeo@users.noreply.github.com> Co-authored-by: Daniel Hutzel <daniel.hutzel@sap.com> Co-authored-by: Mariya Yordanova <mariya.yordanova@sap.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.