watcher
kind: watchername: schemaspec: prefix: packages/schema include: ["**/*.graphql"] exclude: ["**/generated/**"]---kind: processname: codegenspec: cmd: pnpm args: [codegen] env: SCHEMA_REVISION: ${ watcher.schema.status.revision }File sets
Section titled “File sets”A file set is shared by watcher and a process’s watch:
| field | default | |
|---|---|---|
include |
globs of files to follow | [] |
exclude |
globs to leave out | [] |
prefix |
the directory the globs are relative to, itself relative to the workspace root | the root |
File sets are followed through watchman.
Status
Section titled “Status”{ "revision": "8c1f…", "files": 42 }revision is a hash of the set’s file list and contents; files is the count. Reading revision from another resource makes that resource re-render whenever a watched file changes, so the codegen process above restarts with every schema edit. A process that should simply restart on its own source changes uses its watch field instead.

