This means that you can use whatever database technology you like to fetch and save data for instance - SQL, ORMs, NoSQL, JSON, or in-memory data all work just fine.įor these examples, we’ll assume we’ve stored the data in-memory. For the rest of this post, we’ll use the word filter instead of search.įor each filtering example, we’ll take a look at the originating schema, how to write a query within it, and a resolver implementation.Īs a reminder, GraphQL is data source-agnostic. The goal is to find an item (or a list of items) that matches some sort of criteria. Searching is filtering: Searching and filtering are two different ways to say the same thing. To learn how to handle searching and filtering on the front-end using Apollo Client, read “ How to Filter and Search using Variables in Apollo Client“. In this article, we’ll learn how to add filtering capabilities to your API by walking through a few real-world examples. Searching and filtering is a standard part of any GraphQL API.