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
You can see this on the PayloadPreference_where input in the generated schema, but I first encountered it when using @payloadcms/plugin-search. After setting up the search plugin, observe the generated Search_where inputs:
Link to reproduction
No response
Describe the Bug
When a collection has a queryable document field of the form
The generated GraphQL schema for the
where
input is incorrect, withrelationTo
being used as an operator:This is invalid, as
relationTo
is not included invalidOperators
or in theoperatorMap
, meaning the query is completely ignored byparseParams
andbuildSearchParam
.To Reproduce
You can see this on the
PayloadPreference_where
input in the generated schema, but I first encountered it when using@payloadcms/plugin-search
. After setting up the search plugin, observe the generatedSearch_where
inputs:which means that this is a "valid" query but doesn't filter by
collectionA
:In reality it should probably be something like
Potentially being caused by something in
buildWhereInputType
?Payload Version
2.18.1
Adapters and Plugins
db-mongodb
The text was updated successfully, but these errors were encountered: