<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-query-options-api-hpz5ny75l" -->

---
title: The Query Options API | daily.dev
description: React Query version 5 introduced the Query Options API, which provides a simplified and extensible way to create queries. It streamlines the API by passing a...
canonical: https://daily.dev/posts/the-query-options-api-hpz5ny75l
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The Query Options API | daily.dev
og:description: React Query version 5 introduced the Query Options API, which provides a simplified and extensible way to create queries. It streamlines the API by passing a...
og:url: https://daily.dev/posts/the-query-options-api-hpz5ny75l
og:image: https://api.daily.dev/og/posts/HPz5NY75l.png
og:image:alt: The Query Options API
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The Query Options API

**[TkDodo](https://daily.dev/sources/tkdodo)** · [@tkdodo](https://daily.dev/tkdodo) · 13 min read · 19 upvotes · 2 comments

## Summary

React Query version 5 introduced the Query Options API, which provides a simplified and extensible way to create queries. It streamlines the API by passing a single object as an argument, making it easier for new users to understand. The API also allows for sharing query options between different functions, improving code reusability. TypeScript's handling of excess properties is addressed with the queryOptions helper function, which adds type safety to the API. Overall, the Query Options API provides a better abstraction and enhances the developer experience.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://tkdodo.eu/blog/the-query-options-api>

## Community discussion

Top comments from developers on daily.dev.

**@ajseadler** · 0 upvotes

> You’re telling me I can save time?!??

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#react](https://daily.dev/tags/react), [#javascript](https://daily.dev/tags/javascript), [#typescript](https://daily.dev/tags/typescript), [#react-query](https://daily.dev/tags/react-query)

[View this post on daily.dev](https://daily.dev/posts/the-query-options-api-hpz5ny75l)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The Query Options API","url":"https://daily.dev/posts/the-query-options-api-hpz5ny75l","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-query-options-api-hpz5ny75l"},"datePublished":"2024-01-17T16:16:06.015Z","dateModified":"2024-01-18T13:00:11.552Z","description":"React Query version 5 introduced the Query Options API, which provides a simplified and extensible way to create queries. It streamlines the API by passing a...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/27274e478f970dd6374b2e599a53e2b4?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/27274e478f970dd6374b2e599a53e2b4?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"TkDodo","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Person","name":"Dominik D","url":"https://daily.dev/tkdodo","image":"https://avatars.githubusercontent.com/u/1021430?v=4","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":2360}},"commentCount":2,"discussionUrl":"https://daily.dev/posts/the-query-options-api-hpz5ny75l","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":19},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"keywords":"react,javascript,typescript,react-query","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"TkDodo","item":"https://daily.dev/sources/tkdodo"},{"@type":"ListItem","position":3,"name":"The Query Options API"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/the-query-options-api-hpz5ny75l","comment":[{"@type":"Comment","text":"You’re telling me I can save time?!??","datePublished":"2024-01-17T16:49:40.286Z","url":"https://daily.dev/posts/HPz5NY75l#c-WoV8jXl1q","author":{"@type":"Person","name":"Aj Seadler","url":"https://daily.dev/ajseadler","image":"https://avatars.githubusercontent.com/u/134530749?v=4"}}]}
```

