Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions docs/framework/solid/reference/functions/queryOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ redirect_from:
function queryOptions<TQueryFnData, TError, TData, TQueryKey>(options): QueryOptions<TQueryFnData, TError, TData, TQueryKey> & object & QueryKeyWithDataTag<TQueryKey, TQueryFnData, TError>;
```

Defined in: [queryOptions.ts:90](https://github.com/TanStack/query/blob/main/packages/solid-query/src/queryOptions.ts#L90)
Defined in: [queryOptions.ts:89](https://github.com/TanStack/query/blob/main/packages/solid-query/src/queryOptions.ts#L89)

You can generally pass everything to `queryOptions` that you can also pass to `useQuery`. These options can
be shared across hooks and imperative APIs such as `queryClient.query`. `options.queryKey` is required and
Expand Down Expand Up @@ -53,8 +53,7 @@ The same options object, typed so that `queryKey` carries the inferred data type

### See

- [useQuery](useQuery.md) to run a query with these options.
- [The Query Options API](https://tkdodo.eu/blog/the-query-options-api) for more on this pattern.
[useQuery](useQuery.md) to run a query with these options.

### Example

Expand Down Expand Up @@ -90,7 +89,7 @@ function Posts() {
function queryOptions<TQueryFnData, TError, TData, TQueryKey>(options): QueryOptions<TQueryFnData, TError, TData, TQueryKey> & object & QueryKeyWithDataTag<TQueryKey, TQueryFnData, TError>;
```

Defined in: [queryOptions.ts:141](https://github.com/TanStack/query/blob/main/packages/solid-query/src/queryOptions.ts#L141)
Defined in: [queryOptions.ts:139](https://github.com/TanStack/query/blob/main/packages/solid-query/src/queryOptions.ts#L139)

You can generally pass everything to `queryOptions` that you can also pass to `useQuery`. These options can
be shared across hooks and imperative APIs such as `queryClient.query`. `options.queryKey` is required and
Expand Down Expand Up @@ -130,8 +129,7 @@ The same options object, typed so that `queryKey` carries the inferred data type

### See

- [useQuery](useQuery.md) to run a query with these options.
- [The Query Options API](https://tkdodo.eu/blog/the-query-options-api) for more on this pattern.
[useQuery](useQuery.md) to run a query with these options.

### Example

Expand Down
2 changes: 0 additions & 2 deletions packages/solid-query/src/queryOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export type DefinedInitialDataOptions<
* This overload is selected when `initialData` is set, so the resulting `data` is never `undefined`.
*
* @see {@link useQuery} to run a query with these options.
* @see [The Query Options API](https://tkdodo.eu/blog/the-query-options-api) for more on this pattern.
* @param options - The {@link DefinedInitialDataOptions} to use — everything you can pass to `useQuery`, with `initialData` set.
* @returns The same options object, typed so that `queryKey` carries the inferred data type.
*
Expand Down Expand Up @@ -107,7 +106,6 @@ export function queryOptions<
* is the query key to generate options for.
*
* @see {@link useQuery} to run a query with these options.
* @see [The Query Options API](https://tkdodo.eu/blog/the-query-options-api) for more on this pattern.
* @param options - The {@link UndefinedInitialDataOptions} to use — everything you can pass to `useQuery`.
* @returns The same options object, typed so that `queryKey` carries the inferred data type.
*
Expand Down
Loading