Closed Apollinaire closed 3 years ago
I think for the documentation part, the best way at this point is to register the callback with a description. I don't know if are able to do this currently.
I can't register these callbacks here because the connectors are not initialized on the collection creation, they take the collection as a parameter:
DatabaseConnectors.mongo = {
filter: async (collection, input, context) => {...}
}
We could register them inside createCollection
, but it seems weird to register a callback so far from where it's called, that could lead to confusion. Also, the previous equivalent to these callbacks (`${typeName.toLowerCase()}.parameters`
) were not registered. So I guess it's ok to leave it as it is. This is a pretty deep feature, so I guess it's fine to go without the documentation for this one.
Yep agreed, feel free to merge
Adds a callback to Connector.filter, which allows to iterate on the
selector
,options
andfilteredFields
used in a collection's multi query.