Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Content Fields Indexing via GraphQL for content field filtering #12781

Open
Piedone opened this issue Nov 8, 2022 · 7 comments · May be fixed by #16092
Open

Expose Content Fields Indexing via GraphQL for content field filtering #12781

Piedone opened this issue Nov 8, 2022 · 7 comments · May be fixed by #16092

Comments

@Piedone
Copy link
Member

Piedone commented Nov 8, 2022

Is your feature request related to a problem? Please describe.

If you want to filter (with where) on the value of content fields, you have to implement a WhereInputObjectGraphType for it. There's no built-in way to filter on content field values from GraphQL.

This came up in this discussion too.

Describe the solution you'd like

We already have Content Fields Indexing to be able to run SQL queries for field values. Let's build on that, and expose such SQL indices in GraphQL too.

Describe alternatives you've considered

An alternative would be to manually create indices for each field, and a WhereInputObjectGraphType for each of them.

Also, we could expose SQL Queries too: #16008.

@Piedone
Copy link
Member Author

Piedone commented Nov 8, 2022

@MikeAlhayek you may be interested in this.

@MikeAlhayek
Copy link
Member

MikeAlhayek commented Nov 9, 2022

@Piedone thanks. Yes this is what is needed to allow one to filter by specific fields. I don't have much time to dig in, have anyone started working on this? Currently the API isn't very useful without this.

What if I have my own index, what are the steps needed to add the filters for my custom index?

@Piedone
Copy link
Member Author

Piedone commented Nov 9, 2022

I'm not aware of anybody working on this.

@hishamco
Copy link
Member

hishamco commented Nov 9, 2022

I remembered @carlwoodhouse was working on GraphQL, also I don't want to forget @hyzx86 he did a great contributions on both workflow and GraphQL

@hyzx86
Copy link
Contributor

hyzx86 commented Nov 9, 2022

Why don't you try a script query?
I've already made one. that works very well. Opened the door to a new world ;)
In this issue , There is a video at the bottom of the page.

#12766
it can do more than just query.

If you're interested, you can find that in EasyOC.
https://github.com/EasyOC/EasyOC/tree/main/src/Modules/EasyOC.Scripting

@hyzx86

This comment was marked as outdated.

@Piedone
Copy link
Member Author

Piedone commented May 18, 2024

Duplicates #7047.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants