Here is my DB tables:
Here is my query :
products(
product_id: String! @eq
orderBy: _ @orderBy(columns: ["created_at", "product_id"])
): [Product!]! @paginate(defaultCount: 10)
First question is :
I need to pass it like this
products( product_id: "" or null )
And it will return nothings from db. But i want to return all data when "product_id" get empty string or null.
Is there any ways to ignore "product_id" when the "product_id" get empty string or null?
Second question is :
As you see the DB tables
If i want to do a query to search "products" table with "product name" which is in "product_langs" table.
@eq seems not support in this case. Is there any suggestion for this case?
Or i need to create a query with custom search and paginate? If yes, how can i do it? Is there any example about how to create custom paginate and search?
Thanks and regards!