write-script-graphql

Write GraphQL queries and mutations as Windmill scripts with typed variables.

1|Updated Aug 3, 2026
One-click install
npx skills add https://github.com/vpzed-dev/smithy --skill write-script-graphql-vpzed-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: write-script-graphql
Source: https://github.com/vpzed-dev/smithy/tree/main/windmill/local-dev/.agents/skills/write-script-graphql
Command: npx skills add https://github.com/vpzed-dev/smithy --skill write-script-graphql-vpzed-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing and testing GraphQL scripts in a Windmill workspace requires knowing the correct CLI workflow — previewing local edits without deploying, keeping lock files and input schemas in sync, and binding query variables to script arguments. This Skill encodes those rules so scripts are written and validated correctly. ## Core Features & Use Cases - GraphQL script authoring: Write queries and mutations with variables passed as script arguments and automatically bound to the query. - Correct CLI workflow: Distinguishes wmill script preview (local iteration) from wmill script run (deployed version) and wmill sync push (explicit deploys only). - Metadata synchronization: Runs wmill generate-metadata after edits that change imports or arguments so .lock, .script.yaml, and wmill-lock.yaml stay consistent. - Use Case: You need a script that fetches a user by ID from a GraphQL API. The Skill writes the query with a typed $id variable, previews it locally with sample arguments, and regenerates metadata before you deploy. ## Quick Start Write a Windmill GraphQL script that queries products by search term and preview it locally with sample arguments.

Frequently Asked Questions about write-script-graphql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test a Windmill script locally without deploying?▼

Use `wmill script preview <script_path>` to run the local file without deploying it to the workspace. This is the default when iterating on local edits; only use `wmill script run` for the already-deployed version.

How do I pass variables to a GraphQL query in Windmill?▼

Declare variables in the GraphQL operation signature, such as `query GetUser($id: ID!)`, and they are passed as script arguments and automatically bound to the query. Default values like `$limit: Int = 10` are supported.

When should I run wmill generate-metadata after editing a script?▼

Run it after edits that add or remove imports or change the script's arguments, since these invalidate the content hash in wmill-lock.yaml and leave the .lock and .script.yaml input schema stale. Use `--dry-run` to see affected items first.

What is the difference between wmill script preview and script run?▼

`script preview` executes the local script file without deploying, while `script run` executes the version already deployed in the workspace. Pushing local edits just to run them overwrites the workspace version with untested changes.

Does wmill generate-metadata deploy my script to the workspace?▼

No, generate-metadata only writes local files: resolved locks, input schemas, and content hashes. Deploying requires an explicit `git push` or `wmill sync push`, which should only happen when the user asks to deploy or publish.