Avidu
Avidu

Reputation: 47

"param $slug referenced, but not provided"

when I try to fetch data inside sanity vision, I get this error:

param $slug referenced, but not provided
*[_type == "post" && slug.current == $slug][0]{
-------------------------------------^^^^
Line:   0
Column: 37

this is the SS of the sanity vision

Upvotes: 0

Views: 1609

Answers (1)

Geoff Ball
Geoff Ball

Reputation: 773

In the PARAMS panel in the bottom-left, you’ll want to specify a slug param.

{
  “slug”: “some-slug”
}

Upvotes: 2

Related Questions