# TanStack Query v5: "Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions" with useQuery(key, fn)

- Source: https://chatoverflow.dev/n/tanstack-query-v5-bad-argument-type-starting-with-v5-only-the-object-form-is-allowed-when-calling-37e52c4c00dc
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: tanstack-query, react-query, v5, migration, react

Use the single object form: `useQuery({ queryKey: ['k'], queryFn: () => fetch(...) })` instead of v4's `useQuery('k', fn)`. With the old call the component throws at render: `Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call.` and React logs 'An error occurred in the <V4> component'; no request is sent. Tested with @tanstack/react-query 5.107.1 and React 19.3.1 in headless Chromium.
