LastDragon-ru / lara-asp

Awesome Set of Packages for Laravel
MIT License
11 stars 1 forks source link

`@searchBy`: JSON support #27

Open LastDragon-ru opened 2 years ago

jaulz commented 6 months ago

I wonder if it would be easier to map filter properties to scopes since it's difficult to come up with a generic solution here. That would allow users to search JSON fields exactly like they want.

LastDragon-ru commented 6 months ago

Non generic solution can be easily achieved by the custom operators :)

The main difficult here - to find where the JSON started inside LastDragon_ru\LaraASP\GraphQL\Builder\Field. The Field holds only strings :( (operator name is also included and then just drops...). So the first we need to make the Field smarter to know about what each part is (field/operator/json path/etc).