Open
Description
[REQUIRED] Environment info
14.0.9firebase-tools: 14.0.9
Platform: MacOs
[REQUIRED] Test case
According to the docs https://firebase.google.com/docs/data-connect/schemas-queries-mutations#string_operations_and_regular_expressions it should be possible to filter using something like companies(where: {name: {pattern: {like: "%apple%", ignoreCase: true}}})
for string fields.
However, our String_Filter looks like this in prelude.gql:
"Query filter criteria for `String` scalar fields."
input String_Filter {
"When true, match if field `IS NULL`. When false, match if field is `NOT NULL`."
isNull: Boolean
"Match if field is exactly equal to provided value."
eq: String @fdc_oneOf(group: "eq")
"""
Match if field is exactly equal to the result of the provided server value
expression. Currently only `auth.uid` is supported as an expression.
"""
eq_expr: String_Expr @fdc_oneOf(group: "eq")
"Match if field is not equal to provided value."
ne: String @fdc_oneOf(group: "ne")
"""
Match if field is not equal to the result of the provided server value
expression. Currently only `auth.uid` is supported as an expression.
"""
ne_expr: String_Expr @fdc_oneOf(group: "ne")
"Match if field value is among the provided list of values."
in: [String!]
"Match if field value is not among the provided list of values."
nin: [String!]
"Match if field value is greater than the provided value."
gt: String
"Match if field value is greater than or equal to the provided value."
ge: String
"Match if field value is less than the provided value."
lt: String
"Match if field value is less than or equal to the provided value."
le: String
"""
Match if field value contains the provided value as a substring. Equivalent
to `LIKE '%value%'`
"""
contains: String
"""
Match if field value starts with the provided value. Equivalent to
`LIKE 'value%'`
"""
startsWith: String
"""
Match if field value ends with the provided value. Equivalent to
`LIKE '%value'`
"""
endsWith: String
}
Therefore, we cannot use pattern
for string filters. And we cannot do case insensitive search.
[REQUIRED] Steps to reproduce
Create an schema where one of the attributes is of type String
[REQUIRED] Expected behavior
String_Filter should contain a pattern option
[REQUIRED] Actual behavior
String_Filter looks like this:
"Query filter criteria for `String` scalar fields."
input String_Filter {
"When true, match if field `IS NULL`. When false, match if field is `NOT NULL`."
isNull: Boolean
"Match if field is exactly equal to provided value."
eq: String @fdc_oneOf(group: "eq")
"""
Match if field is exactly equal to the result of the provided server value
expression. Currently only `auth.uid` is supported as an expression.
"""
eq_expr: String_Expr @fdc_oneOf(group: "eq")
"Match if field is not equal to provided value."
ne: String @fdc_oneOf(group: "ne")
"""
Match if field is not equal to the result of the provided server value
expression. Currently only `auth.uid` is supported as an expression.
"""
ne_expr: String_Expr @fdc_oneOf(group: "ne")
"Match if field value is among the provided list of values."
in: [String!]
"Match if field value is not among the provided list of values."
nin: [String!]
"Match if field value is greater than the provided value."
gt: String
"Match if field value is greater than or equal to the provided value."
ge: String
"Match if field value is less than the provided value."
lt: String
"Match if field value is less than or equal to the provided value."
le: String
"""
Match if field value contains the provided value as a substring. Equivalent
to `LIKE '%value%'`
"""
contains: String
"""
Match if field value starts with the provided value. Equivalent to
`LIKE 'value%'`
"""
startsWith: String
"""
Match if field value ends with the provided value. Equivalent to
`LIKE '%value'`
"""
endsWith: String
}