generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 10
feat: null and undefined values in arguments and empty input objects and lists in filters
#25
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
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
e706db1
Prettier format
schwma 7b7b9d4
Add tests for null and undefined values in args
schwma cea11c5
Ignore arguments with values of null
schwma fc3c345
Improve check if literal is a scalar to be parsed
schwma 3f98c53
Replace variable null values with AST NullValues
schwma cb6ae61
Add convenience AST NullValue value
schwma 588b1f9
Substitute undefined variables with undefined
schwma 01702b2
Ignore arguments with undefined variable values
schwma 6618244
Add changelog entries
schwma 4f9cd84
Merge branch 'main' into null-and-undefined-values-in-arguments
schwma e945d45
Merge branch 'main' into null-and-undefined-values-in-arguments
schwma 8833e07
Use gql tag in null/undefined tests
schwma b33986d
Merge branch 'main' into null-and-undefined-values-in-arguments
schwma 9331fe2
Merge branch 'main' into null-and-undefined-values-in-arguments
schwma 0bb2724
Merge branch 'main' into null-and-undefined-values-in-arguments
schwma dd24d16
Merge branch 'main' into null-and-undefined-values-in-arguments
schwma df9e5d5
Move changelog entries to newest release
schwma a894eb0
Merge branch 'main' into null-and-undefined-values-in-arguments
schwma 8a47426
Ignore undefined properties in filter objects
schwma 55840b6
Ignore incomplete filters like `{ ID: { stock: null } }`
schwma a81f49c
Don't check if parseLiteral function is defined
schwma 66a5cc1
Add tests combining undefined/null and non-undefined/non-null variabl…
schwma 78a3576
Prettier format
schwma 06551f9
Merge branch 'main' into null-and-undefined-values-in-arguments
schwma a63b839
Create false _xpr for empty filter lists
schwma 4bba695
Adjust tests so that incomplete filters return no results
schwma 28ca365
Also adjust tests without connections
schwma e33f9a1
Empty filter objects return true _xprs
schwma 83c69b5
Adjust tests so that incomplete filters are ignored
schwma c4d1339
Remove empty describe block
schwma 7fcce28
Move up filter leaf guard clause
schwma 2a9fd9e
Remove duplicated tests
schwma 7d495b5
Remove insert from variables test
schwma 3ff022f
Add tests for empty filter structures joined with equality filters
schwma 69f229a
Add changelog entry
schwma 741cf09
Split filter tests into two describe blocks
schwma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| const getArgumentByName = (args, name) => args.find(arg => arg.name.value === name) | ||
| const { Kind } = require('graphql') | ||
|
|
||
| const getArgumentByName = (args, name) => | ||
| args.find(arg => arg.value && arg.name.value === name && arg.value.kind !== Kind.NULL) | ||
|
|
||
| module.exports = { getArgumentByName } |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.