Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

searching functionality with graphql

default discord avatar
bhavikak.2 years ago
6

hello is it possible to implement searching functionality with graphql.

  • discord user avatar
    denolfe
    2 years ago

    Yes, the "plural" version of the collections can accept a where clause like this:

  • default discord avatar
    bhavikak.2 years ago

    but it's like an filter. i get all pages title that include abc keyword in title.

  • discord user avatar
    denolfe
    2 years ago

    That is not the behavior that I'm seeing



    Here is if I modify the above query

  • default discord avatar
    bhavikak.2 years ago

    okay

    @967118574445547650

    it means i have to choose another way right?

  • discord user avatar
    denolfe
    2 years ago

    No, you were claiming that you were getting "all pages title that include abc keyword", and I showed you that

    equals

    searches the field in its entirety



    The

    like

    keyword instead of

    equals

    can be used for partial searches.

  • default discord avatar
    bhavikak.2 years ago

    it's working 🤘



    thanks a lot

    @967118574445547650

    for the help.

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.