Structured Content 101: Find out how to make your content work harder (without your team working harder) →

The Vision Plugin

Quickly test your GROQ queries using this studio plugin

Vision is a plugin that lets you quickly test your GROQ queries right from the Studio. It shows up as a tool in the navigation bar when installed, and is part of the default Studio setup when running in development mode.

Use the Vision plugin to test your GROQ queries

To install it, use the terminal and go to the root directory of your Sanity project, and run sanity install @sanity/vision. If you have the development server running while doing this, you need to restart it in order to see Vision in your Studio.


You can only use Vision to test queries. You cannot use it for mutations.


Query parameters in Vision works the same way as with the Sanity client libraries. Given an object {minSeats: 2} in the Params field, you may use the keys in the object as parameters in the query: *[_type == "bike" && seats >= $minSeats] {name, seats}. Note that every param key is prefixed with $.

To learn more about how to write queries for Vision, read How Queries Work - GROQ.


The Vision plugin is an example of a Studio tool. Want to write your own tool? You can bootstrap one by running sanity init plugin and select it from the list.

Was this article helpful?