---
title: "DF0028: Snapshot Type Mismatch"
description: "Function \"{name}\" with type \"{type}\" cannot use snapshot: true. Only \"query\" functions support this sugar; \"static\" functions have equivalent default behavior already."
canonical_url: "https://devfra.me/errors/df0028"
---
# DF0028: Snapshot Type Mismatch

> Function "\{name}" with type "\{type}" cannot use snapshot: true. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.

## Message

> Function "`{name}`" with type "`{type}`" cannot use `snapshot: true`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.

## Cause

`snapshot: true` is sugar for "query in dev, single baked snapshot in build". It is only meaningful on `'query'` functions: `'static'` already has equivalent default behavior, and `'action'` / `'event'` have nothing to snapshot.

## Fix

Remove `snapshot: true`, or change the function `type` to `'query'`.

## Source

- [`packages/devframe/src/rpc/validation.ts`](https://github.com/devframes/devframe/blob/main/packages/devframe/src/rpc/validation.ts): definition validation throws `DF0028` when `snapshot: true` is set on a function whose type is not `'query'`.


## Sitemap

See the full [sitemap](https://devfra.me/sitemap.md) for all pages.
