# Working with the `orderBy` filter in Hygraph

[Join our Slack](https://slack.hygraph.com)

This example demonstrates ways you can order Hygraph query results by using variables.

This example is built with [Next.js](https://nextjs.org), [`graphql-request`](https://github.com/prisma-labs/graphql-request) and [swr](https://swr.vercel.app/).

• [Demo](https://hygraph-using-order-by-filter.vercel.app)

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/hygraph/hygraph-examples/tree/master/using-order-by-filter) [![Clone project](https://hygraph.com/button)](https://app.hygraph.com/clone/0ff23f7a41ce4da69a366ab299cc24d8)

## How to Use

### Download Manually

```bash
npx degit hygraph/hygraph-examples/using-order-by-filter using-order-by-filter
```

Install & Run:

```bash
cd using-order-by-filter
npm install
npm run dev
# or
cd using-order-by-filter
yarn
yarn dev
```

### Run on Codesandbox

[![Develop with Codesandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/hygraph/hygraph-examples/tree/master/using-order-by-filter)
