My previous query before using LightHouse:
$locations = Location::where('name', 'LIKE', "%$query%")->get();
Current Query with LightHouse
searchLocation(name: String! @where(operator: "like")): [Location] @all
Problem: This only gives me the result when the full name is matching. How can I do a wild card search as I did with the eloquent example?
I think that you you have to pass %SEARCHTEXT% as name arg. It will not do it for you. Otherwise, just use @field and do what you are used to do "before using lighthouse" (you can manipulate the query builder as you want)...
Passing %SEARCHTEXT% as name arg solved my issue. Thanks.
%SEARCHTEXT% it is working Thanks, on Lighthouse v4.7
Most helpful comment
I think that you you have to pass
%SEARCHTEXT%asnamearg. It will not do it for you. Otherwise, just use@fieldand do what you are used to do "before using lighthouse" (you can manipulate the query builder as you want)...