You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. The issue provides a reproduction available on Github, Stackblitz or CodeSandbox
see the test cases
2. A failing test has been provided
3. A local solution has been provided
4. A pull request is pending review
Describe the bug
If the store does not have an entry for typeName yet, then filter() or find() of the type raises:
TypeError: Cannot convert undefined or null to object
To Reproduce Steps to reproduce the behavior:
Create a MockStore with no entries. Call store.filter('foo', x => true) and see the exception
Expected behavior
It should return an empty array instead of raising an exception.
Environment:
OS: macos
@graphql-tools/mock: 9.0.3
NodeJS: v22.2.0
Additional context
The text was updated successfully, but these errors were encountered:
snstanton
added a commit
to VeevaLabs/graphql-tools
that referenced
this issue
Jun 13, 2024
* Fix errors in find and filter with an empty store (#6262)
* Fix errors in find and filter with an empty store (#6262)
* fix prettier issues
* add changeset
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Describe the bug
If the store does not have an entry for typeName yet, then filter() or find() of the type raises:
TypeError: Cannot convert undefined or null to object
To Reproduce Steps to reproduce the behavior:
Create a MockStore with no entries. Call store.filter('foo', x => true) and see the exception
Expected behavior
It should return an empty array instead of raising an exception.
Environment:
@graphql-tools/mock
: 9.0.3Additional context
The text was updated successfully, but these errors were encountered: