بنقرة واحدة
update-gql-schema
Use when updating the SDK GraphQL schema from a local or staging API server
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when updating the SDK GraphQL schema from a local or staging API server
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | update-gql-schema |
| description | Use when updating the SDK GraphQL schema from a local or staging API server |
Updates the SDK's GraphQL schema and related types from an API server instance.
/update-gql-schema local # Download from local server
/update-gql-schema staging # Download from staging server
/update-gql-schema # Will prompt for server choice
You MUST use TodoWrite to create a todo for EACH step below. Mark each complete only after verification.
local or stagingpackages/graphql:
pnpm gql:download:localpnpm gql:download:stagingpnpm gql:generate to regenerate TypeScript introspection typespackages/graphql/schema.graphql with existing GQL documentsenum definitions in packages/graphql/schema.graphqlpackages/graphql/src/enums.ts with JSDoc commentspackages/graphql/src/graphql.tsgraphql.ts scalars config (alphabetically ordered)export type InputName = ReturnType<typeof graphql.scalar<'InputName'>>;graphql.ts for all input typesIMPORTANT: Do not mark the schema update complete until build and all tests pass.
pnpm check from packages/graphql to verify document integritypnpm build to ensure TypeScript compilation succeeds
pnpm buildpnpm test --run to verify tests pass
pnpm build firstpnpm lint:fix to format code/**
* Description of what this enum represents.
*/
export enum EnumName {
/**
* Description of this value
*/
VALUE_ONE = 'VALUE_ONE',
/**
* Description of this value
*/
VALUE_TWO = 'VALUE_TWO',
}
// Add to imports
import type { ..., EnumName } from './enums';
// Add to scalars config (alphabetically)
scalars: {
...
EnumName: EnumName,
...
}
export type InputName = ReturnType<typeof graphql.scalar<'InputName'>>;
| Condition | Action |
|---|---|
| Schema download fails | Check if server is running, verify URL |
pnpm check fails | Fix document errors before proceeding |
| Build fails | Fix TypeScript errors, re-run build until it passes |
| Tests fail | Investigate and fix failing tests, re-run until all pass |
Never mark the schema update as complete while build errors or test failures exist. The iterative fix-and-verify loop is mandatory.
ReturnType<typeof graphql.scalar<'EnumName'>>graphql.tspnpm build and pnpm test --run and fix all errors before marking complete