<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/firestore](./firestore.md) &gt; [lite](./firestore_lite.md) &gt; [Query](./firestore_lite.query.md) &gt; [withConverter](./firestore_lite.query.withconverter_1.md)

## Query.withConverter() method

Applies a custom data converter to this query, allowing you to use your own custom model objects with Firestore. When you call [getDocs()](./firestore_.getdocs.md) with the returned query, the provided converter will convert between Firestore data and your custom type `U`<!-- -->.

<b>Signature:</b>

```typescript
withConverter<U>(converter: FirestoreDataConverter<U>): Query<U>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  converter | [FirestoreDataConverter](./firestore_lite.firestoredataconverter.md)<!-- -->&lt;U&gt; | Converts objects to and from Firestore. |

<b>Returns:</b>

[Query](./firestore_lite.query.md)<!-- -->&lt;U&gt;

A `Query<U>` that uses the provided converter.

