Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
TkDodo authored Jul 18, 2024
2 parents 43f0722 + d02e610 commit 76abb16
Show file tree
Hide file tree
Showing 60 changed files with 2,000 additions and 165 deletions.
17 changes: 17 additions & 0 deletions docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,23 @@
"to": "framework/solid/reference/createQuery"
}
]
},
{
"label": "svelte",
"children": [
{
"label": "Svelte Reference",
"to": "framework/svelte/reference/index"
},
{
"label": "Functions / createQuery",
"to": "framework/svelte/reference/createquery"
},
{
"label": "Functions / createMutation",
"to": "framework/svelte/reference/createmutation"
}
]
}
]
},
Expand Down
18 changes: 18 additions & 0 deletions docs/framework/react/guides/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,21 @@ A mutation filter object supports the following properties:
- Allows for filtering mutations according to their status.
- `predicate?: (mutation: Mutation) => boolean`
- This predicate function will be used as a final filter on all matching mutations. If no other filters are specified, this function will be evaluated against every mutation in the cache.

## Utils

### `matchQuery`

```tsx
const isMatching = matchQuery(filters, query)
```

Returns a boolean that indicates whether a query matches the provided set of query filters.

### `matchMutation`

```tsx
const isMatching = matchMutation(filters, mutation)
```

Returns a boolean that indicates whether a mutation matches the provided set of mutation filters.
32 changes: 32 additions & 0 deletions docs/framework/svelte/reference/createbasemutationresult.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
id: CreateBaseMutationResult
title: CreateBaseMutationResult
---

# Type Alias: CreateBaseMutationResult\<TData, TError, TVariables, TContext\>

```ts
type CreateBaseMutationResult<TData, TError, TVariables, TContext>: Override<MutationObserverResult<TData, TError, TVariables, TContext>, object> & object;
```

## Type declaration

### mutateAsync

```ts
mutateAsync: CreateMutateAsyncFunction<TData, TError, TVariables, TContext>
```

## Type Parameters

**TData** = `unknown`

**TError** = `DefaultError`

**TVariables** = `unknown`

**TContext** = `unknown`

## Defined in

[packages/svelte-query/src/types.ts:113](https://github.com/TanStack/query/blob/13817e953743537ffb9aab4da174583055be4d81/packages/svelte-query/src/types.ts#L113)
28 changes: 28 additions & 0 deletions docs/framework/svelte/reference/createbasequeryoptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
id: CreateBaseQueryOptions
title: CreateBaseQueryOptions
---

# Type Alias: CreateBaseQueryOptions\<TQueryFnData, TError, TData, TQueryData, TQueryKey\>

```ts
type CreateBaseQueryOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>: QueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>;
```

Options for createBaseQuery

## Type Parameters

**TQueryFnData** = `unknown`

**TError** = `DefaultError`

**TData** = `TQueryFnData`

**TQueryData** = `TQueryFnData`

**TQueryKey** _extends_ `QueryKey` = `QueryKey`

## Defined in

[packages/svelte-query/src/types.ts:23](https://github.com/TanStack/query/blob/13817e953743537ffb9aab4da174583055be4d81/packages/svelte-query/src/types.ts#L23)
22 changes: 22 additions & 0 deletions docs/framework/svelte/reference/createbasequeryresult.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
id: CreateBaseQueryResult
title: CreateBaseQueryResult
---

# Type Alias: CreateBaseQueryResult\<TData, TError\>

```ts
type CreateBaseQueryResult<TData, TError>: Readable<QueryObserverResult<TData, TError>>;
```

Result from createBaseQuery

## Type Parameters

**TData** = `unknown`

**TError** = `DefaultError`

## Defined in

[packages/svelte-query/src/types.ts:32](https://github.com/TanStack/query/blob/13817e953743537ffb9aab4da174583055be4d81/packages/svelte-query/src/types.ts#L32)
42 changes: 42 additions & 0 deletions docs/framework/svelte/reference/createinfinitequery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
id: createInfiniteQuery
title: createInfiniteQuery
---

# Function: createInfiniteQuery()

```ts
function createInfiniteQuery<
TQueryFnData,
TError,
TData,
TQueryKey,
TPageParam,
>(options, queryClient?): CreateInfiniteQueryResult<TData, TError>
```

## Type Parameters

**TQueryFnData**

**TError** = `Error`

**TData** = `InfiniteData`\<`TQueryFnData`, `unknown`\>

**TQueryKey** _extends_ `QueryKey` = `QueryKey`

**TPageParam** = `unknown`

## Parameters

**options**: [`StoreOrVal`](storeorval.md)\<[`CreateInfiniteQueryOptions`](createinfinitequeryoptions.md)\<`TQueryFnData`, `TError`, `TData`, `TQueryFnData`, `TQueryKey`, `TPageParam`\>\>

**queryClient?**: `QueryClient`

## Returns

[`CreateInfiniteQueryResult`](createinfinitequeryresult.md)\<`TData`, `TError`\>

## Defined in

[packages/svelte-query/src/createInfiniteQuery.ts:16](https://github.com/TanStack/query/blob/13817e953743537ffb9aab4da174583055be4d81/packages/svelte-query/src/createInfiniteQuery.ts#L16)
30 changes: 30 additions & 0 deletions docs/framework/svelte/reference/createinfinitequeryoptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
id: CreateInfiniteQueryOptions
title: CreateInfiniteQueryOptions
---

# Type Alias: CreateInfiniteQueryOptions\<TQueryFnData, TError, TData, TQueryData, TQueryKey, TPageParam\>

```ts
type CreateInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey, TPageParam>: InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey, TPageParam>;
```

Options for createInfiniteQuery

## Type Parameters

**TQueryFnData** = `unknown`

**TError** = `DefaultError`

**TData** = `TQueryFnData`

**TQueryData** = `TQueryFnData`

**TQueryKey** _extends_ `QueryKey` = `QueryKey`

**TPageParam** = `unknown`

## Defined in

[packages/svelte-query/src/types.ts:52](https://github.com/TanStack/query/blob/13817e953743537ffb9aab4da174583055be4d81/packages/svelte-query/src/types.ts#L52)
22 changes: 22 additions & 0 deletions docs/framework/svelte/reference/createinfinitequeryresult.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
id: CreateInfiniteQueryResult
title: CreateInfiniteQueryResult
---

# Type Alias: CreateInfiniteQueryResult\<TData, TError\>

```ts
type CreateInfiniteQueryResult<TData, TError>: Readable<InfiniteQueryObserverResult<TData, TError>>;
```

Result from createInfiniteQuery

## Type Parameters

**TData** = `unknown`

**TError** = `DefaultError`

## Defined in

[packages/svelte-query/src/types.ts:69](https://github.com/TanStack/query/blob/13817e953743537ffb9aab4da174583055be4d81/packages/svelte-query/src/types.ts#L69)
24 changes: 24 additions & 0 deletions docs/framework/svelte/reference/createmutateasyncfunction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
id: CreateMutateAsyncFunction
title: CreateMutateAsyncFunction
---

# Type Alias: CreateMutateAsyncFunction\<TData, TError, TVariables, TContext\>

```ts
type CreateMutateAsyncFunction<TData, TError, TVariables, TContext>: MutateFunction<TData, TError, TVariables, TContext>;
```

## Type Parameters

**TData** = `unknown`

**TError** = `DefaultError`

**TVariables** = `void`

**TContext** = `unknown`

## Defined in

[packages/svelte-query/src/types.ts:106](https://github.com/TanStack/query/blob/13817e953743537ffb9aab4da174583055be4d81/packages/svelte-query/src/types.ts#L106)
32 changes: 32 additions & 0 deletions docs/framework/svelte/reference/createmutatefunction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
id: CreateMutateFunction
title: CreateMutateFunction
---

# Type Alias: CreateMutateFunction()\<TData, TError, TVariables, TContext\>

```ts
type CreateMutateFunction<TData, TError, TVariables, TContext>: (...args) => void;
```

## Type Parameters

**TData** = `unknown`

**TError** = `DefaultError`

**TVariables** = `void`

**TContext** = `unknown`

## Parameters

• ...**args**: `Parameters`\<`MutateFunction`\<`TData`, `TError`, `TVariables`, `TContext`\>\>

## Returns

`void`

## Defined in

[packages/svelte-query/src/types.ts:97](https://github.com/TanStack/query/blob/13817e953743537ffb9aab4da174583055be4d81/packages/svelte-query/src/types.ts#L97)
37 changes: 37 additions & 0 deletions docs/framework/svelte/reference/createmutation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
id: createMutation
title: createMutation
---

# Function: createMutation()

```ts
function createMutation<TData, TError, TVariables, TContext>(
options,
queryClient?,
): CreateMutationResult<TData, TError, TVariables, TContext>
```

## Type Parameters

**TData** = `unknown`

**TError** = `Error`

**TVariables** = `void`

**TContext** = `unknown`

## Parameters

**options**: [`StoreOrVal`](storeorval.md)\<[`CreateMutationOptions`](createmutationoptions.md)\<`TData`, `TError`, `TVariables`, `TContext`\>\>

**queryClient?**: `QueryClient`

## Returns

[`CreateMutationResult`](createmutationresult.md)\<`TData`, `TError`, `TVariables`, `TContext`\>

## Defined in

[packages/svelte-query/src/createMutation.ts:13](https://github.com/TanStack/query/blob/13817e953743537ffb9aab4da174583055be4d81/packages/svelte-query/src/createMutation.ts#L13)
26 changes: 26 additions & 0 deletions docs/framework/svelte/reference/createmutationoptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
id: CreateMutationOptions
title: CreateMutationOptions
---

# Type Alias: CreateMutationOptions\<TData, TError, TVariables, TContext\>

```ts
type CreateMutationOptions<TData, TError, TVariables, TContext>: OmitKeyof<MutationObserverOptions<TData, TError, TVariables, TContext>, "_defaulted">;
```

Options for createMutation

## Type Parameters

**TData** = `unknown`

**TError** = `DefaultError`

**TVariables** = `void`

**TContext** = `unknown`

## Defined in

[packages/svelte-query/src/types.ts:87](https://github.com/TanStack/query/blob/13817e953743537ffb9aab4da174583055be4d81/packages/svelte-query/src/types.ts#L87)
26 changes: 26 additions & 0 deletions docs/framework/svelte/reference/createmutationresult.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
id: CreateMutationResult
title: CreateMutationResult
---

# Type Alias: CreateMutationResult\<TData, TError, TVariables, TContext\>

```ts
type CreateMutationResult<TData, TError, TVariables, TContext>: Readable<CreateBaseMutationResult<TData, TError, TVariables, TContext>>;
```

Result from createMutation

## Type Parameters

**TData** = `unknown`

**TError** = `DefaultError`

**TVariables** = `unknown`

**TContext** = `unknown`

## Defined in

[packages/svelte-query/src/types.ts:126](https://github.com/TanStack/query/blob/13817e953743537ffb9aab4da174583055be4d81/packages/svelte-query/src/types.ts#L126)
Loading

0 comments on commit 76abb16

Please sign in to comment.