Custom Query Filters
While you can create custom resolvers for 3rd party data or functions, this doesnt help me use graphQL to search existing types. I want to be able to query an existing type based on a contains. I know that this is a complex issue, but if we could create a custom query filter like we do for in, gt, lt, etc, I think this would help make the graphQL API more usable.
Currently, we are reduced to either using the limited query abilities, or recreate everything from scratch.
For instance:
I have a query currently:
query {
authorizationGroup(query: { name: "exactValue" }) {
_id
description
name
permissions
}
}
With this, I can ONLY search exact values. But if we could create custom Query Inputs, I think it would make the GraphQL query much more usable:
query {
authorizationGroup(query: { name_contains: "part*" }) {
_id
description
name
permissions
}
}
Then you can implement a function to process this as needed.
Hi all,
We recently announced that we have decided to deprecate the Atlas GraphQL API, and current users should’ve received an email explaining the details of the deprecation and end-of-life plan. Consequently, we will not be adding new features going forward and are updating the status for all related feedback accordingly.
Please read our announcement in the MongoDB Developer Center for more details and guidance on the migration process and timeline. Should you have any questions or need further assistance, please reach out to our support team via the MongoDB Support Portal.
We truly prioritize your satisfaction and success, and we thank you for your patience and the feedback you have provided us over the years.
-
Olivier Wouters commented
It would be cool to add a property to a query input, have an aggregation generated from the current query input (without the property, through a function in the custom resolver code), add the stuff you want to the aggregation and execute it. This way you could implement a `near` property on a geojson query input for instance :)