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
4 changes: 2 additions & 2 deletions packages/solid-query/src/QueryClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface QueryObserverOptions<
* Set this to a reconciliation key to enable reconciliation between query results.
* Set this to `false` to disable reconciliation between query results.
* Set this to a function which accepts the old and new data and returns resolved data of the same type to implement custom reconciliation logic.
* Defaults reconciliation key to `id`.
* Defaults reconciliation to false.
*/
reconcile?:
| string
Expand Down Expand Up @@ -60,7 +60,7 @@ export interface InfiniteQueryObserverOptions<
* Set this to a reconciliation key to enable reconciliation between query results.
* Set this to `false` to disable reconciliation between query results.
* Set this to a function which accepts the old and new data and returns resolved data of the same type to implement custom reconciliation logic.
* Defaults reconciliation key to `id`.
* Defaults reconciliation to false.
*/
reconcile?:
| string
Expand Down
1 change: 1 addition & 0 deletions packages/solid-query/src/__tests__/createQuery.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@ describe('createQuery', () => {
count++
return count === 1 ? result1 : result2
},
reconcile: 'id',
}))

createRenderEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions packages/solid-query/src/createBaseQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export function createBaseQuery<
const isRestoring = useIsRestoring()

const defaultedOptions = createMemo(() =>
mergeProps(client().defaultQueryOptions(options()), {
mergeProps(client()?.defaultQueryOptions(options()) || {}, {
get _optimisticResults() {
return isRestoring() ? 'isRestoring' : 'optimistic'
},
Expand Down Expand Up @@ -167,7 +167,7 @@ export function createBaseQuery<
return reconcileFn(
store,
result,
reconcileOptions === undefined ? 'id' : reconcileOptions,
reconcileOptions === undefined ? false : reconcileOptions,
)
})
// If the query has data we dont suspend but instead mutate the resource
Expand Down