-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support case-insensitive search for all views #161
Support case-insensitive search for all views #161
Conversation
8ef9ac3
to
fcefb0d
Compare
Removing this change request as we have discussed over Zoom. The new regex handles partial string matching and eliminates our need for _CONTAINS
.
fcefb0d
to
3847c4c
Compare
Signed-off-by: Angelica Ochoa <15623749+ao508@users.noreply.github.com>
6e9a893
to
49f5c92
Compare
49f5c92
to
a6024b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replacing all instances of predicates _IN
and _CONTAINS
with _MATCHES
. This lets us pass in a regex that enables both case-insensitive and partial string searches.
const httpLink = createHttpLink({ | ||
uri: "https://localhost:4000/graphql", | ||
fetch: fetch, | ||
}); | ||
|
||
const client = new ApolloClient({ | ||
link: httpLink, | ||
cache: new InMemoryCache(), | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed as these are not being used. (These were used previously to query some samples data as part of the old sample mutation workflow.)
filters: { | ||
String: { | ||
MATCHES: true, | ||
}, | ||
}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI I removed ID: true
inside of String: { ... }
. That config would let us perform RegEx matching on values of type ID
(source), which is a use case that we don't have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't ID something we were interested in accessing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we are interested in accessing the ID, but setting ID: true
here does something else. The docs link I shared above says it enables RegEx matching for value of type ID. For example, if we wanted to search for internal ID containing value "abc". Maybe I missed something there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a little confused about adding the ID
support. Does that not also expose that field for us?
filters: { | ||
String: { | ||
MATCHES: true, | ||
}, | ||
}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't ID something we were interested in accessing?
For card #1263. This PR enables case-insensitive and partial string search for all views.
Example: