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

# answerFixtureQuery

> Answers one tap.data.query from the fixtures, which is what the mock bridge does.

```ts theme={null}
function answerFixtureQuery<Q>(query): TapResult<Q>;
```

Answers one `tap.data.query` from the fixtures, which is what the mock bridge
does.

## Type Parameters

### Q

`Q` *extends* `TapQuery`

## Parameters

### query

`Q`

## Returns

`TapResult`\<`Q`>

## Remarks

Every branch is cloned with `structuredClone`, so a component that sorts or
splices a result cannot reach the fixture the next test reads. It checks no
scope — `createTapMock` refuses an ungranted kind before it gets here — and it
ignores the range and platform in the query, so the numbers are the same
whatever the filter bar says. The seven assertions inside are the one place
TypeScript cannot follow the distributive conditional in `TapResult<Q>` back
through a `switch`; each branch returns exactly the result its `case` selected.

## Example

```ts theme={null}
import { answerFixtureQuery } from '@tappify/extension-sdk/testing';

const reviews = answerFixtureQuery({
  kind: 'reviews',
  range: { from: '2026-09-01', to: '2026-09-08' },
});
const lowest = Math.min(...reviews.reviews.map(review => review.rating));
```
