Berian Chaiwa
05/04/2022, 5:00 PMcontains fails to match if filter is the first word of text? E.g., Say description="Chaiwa is a good guy" , sending filter: "guy" matches this record but sending filter: "chai" fails. See implementation of the where clause for the query below:
const where = args.filter
? {
OR: [
{
description: { contains: args.filter },
url: { contains: args.filter },
},
],
}
: {};Jacob Ley
05/04/2022, 7:03 PMurl?
Right now that OR is useless I believe. If you want to match the description OR the url, put those in two separate objects
const where = args.filter
? {
OR: [
{
description: { contains: args.filter },
},
{
url: { contains: args.filter },
},
],
}
: {};Jared Fraser
05/04/2022, 11:14 PMchai != ChaiBerian Chaiwa
05/04/2022, 11:45 PMBerian Chaiwa
05/04/2022, 11:46 PM