-
Notifications
You must be signed in to change notification settings - Fork 73
Search case sensitivity #1967
Comments
Automatically generated comment to notify maintainers |
I've thought about this and though it would be easy enough to add, the filter input fields are purely to map to an underlying database table/collection - adding case sensitivity to the filter would also mix configuration into it this. We don't want to make the inputs too complex. In your particular use case, do you see the need to combine |
Yes. Text search is one of the proposed goals on roadmap post 1.0. I'm thinking if there is workaround we can provide here. |
Actually we can see if we can do something like Hasura done: |
@craicoverflow exactly, this is a search query on a string field and supporting the DB-level text search would be ideal since it removes most ambiguity.
I'm not incredibly famiilar with how Graphback internals operate; are the various filters implemented as plugins? Once a plugin is authored it can be exposed as a filter in the schema, similar to what @wtrocki linked? |
Yes, the various filters that you see are applied to the schema through the What this plugin does:
This plugin-first approach makes it possible for anyone to add their own plugins, or for us to extend it in the future with relative ease. Our docs have an example plugin setup guide. Data synhronisation is not embedded into the core of Graphback, instead it is a plugin: https://github.com/aerogear/graphback/blob/master/packages/graphback-datasync/src/DataSyncPlugin.ts#L20 |
That's very slick! I'll need to dig into it. Do you think it's best to implement filters like this at the app level, and not Graphback level? |
I think this specific issue - especially |
+100 |
+1000, we are actually creating a normalized field on models i.e. |
Is your feature request related to a problem? Please describe.
Yes. I'm trying to query a string field, but my query fails since it's case sensitive. For example the DB contains "GITHUB", but my search contains "github".
Describe the solution you'd like
The ability to toggle case sensitivity for a query using a Boolean.
Describe alternatives you've considered
Could regular expressions be an option? So instead of
findJunctions (filter: { name: { contains: "BREA" } })
a developer could passfindJunctions (filter: { name: { regex "/brea/ig" } })
.The text was updated successfully, but these errors were encountered: