Skip to content

GraphQL query for MatrixFields #11511

Answered by brandonkelly
DTesch-Reem asked this question in Q&A
Discussion options

You must be logged in to vote

If you just want your Matrix content to be treated as search keywords for the entries, that’s possible out of the box.

Edit your Matrix field, and ensure it’s “Use this field’s values as search keywords” checkbox is ticked.

Then do the same for each sub-field that you want included in the Matrix field’s search keywords.

Finally, run the following command for any sections that use the Matrix field:

php craft resave/entries --section <sectionHandle> --update-search-index

Once finished, the search GraphQL query argument will work for your Matrix fields.

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@brandonkelly
Comment options

@DTesch-Reem
Comment options

@brandonkelly
Comment options

Comment options

You must be logged in to vote
3 replies
@DTesch-Reem
Comment options

@brandonkelly
Comment options

@DTesch-Reem
Comment options

Answer selected by brandonkelly
Comment options

You must be logged in to vote
1 reply
@brandonkelly
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants