원클릭으로
schema-update
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 | schema-update |
| 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.
/schema-update local # Download from local server
/schema-update staging # Download from staging server
/schema-update # 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:introspection to generate GraphQL documentspackages/graphql/schema.graphql with existing GQL documentsenum definitions in packages/graphql/schema.graphqlpackages/graphql/src/enums.ts with JSDoc commentspackages/graphql/src/graphql.tsgraphql config (alphabetically ordered)packages/graphql/src/inputs.tsexport type InputName = ReturnType<typeof graphql.scalar<'InputName'>>;graphql.ts for all input typesUpdate packages/client/src/cache.ts to handle new/removed types:
id field: Type the data parameter with the fragment type from @aave/graphql and return data.id.
NewTypeName: (data: NewTypeName) => data.id,
null to disable normalization
NewValueObject: () => null,
Add field transformers for enhanced client-side types:
Date objects
TypeName: {
dateField: transformToDate, // for non-nullable DateTime
nullableDateField: transformToNullableDate, // for nullable DateTime
},
BigDecimal class instances
TypeName: {
decimalField: transformToBigDecimal, // for non-nullable BigDecimal
nullableDecimalField: transformToNullableBigDecimal, // for nullable BigDecimal
},
TypeName: {
bigIntField: transformToBigInt,
},
*Activity) typically have timestamp: DateTime! → use transformToDatecreatedAt: DateTime (nullable) → use transformToNullableDatecreatedAt: DateTime! (non-nullable) → use transformToDateBigDecimal fields → use transformToNullableBigDecimalWhen new object types are added to the schema, evaluate whether they belong in packages/client/src/displayTransform.ts:
Erc20Token descendants are reserve assets like WETH that should display as ETH)?
WRAPPED_NATIVE_TRANSFORM_ALLOWLISTWRAPPED_NATIVE_TRANSFORM_BLOCKLISTNote: Types in neither list are transparent — they inherit the transform context from their parent. Only add a type when it needs to change the context (turn it on or off).
IMPORTANT: 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.tstransformToNullableDate/transformToNullableBigDecimal for nullable fields, non-nullable variants for required fieldspnpm build and pnpm test --run and fix all errors before marking completeWRAPPED_NATIVE_TRANSFORM_ALLOWLIST / WRAPPED_NATIVE_TRANSFORM_BLOCKLIST in displayTransform.ts; silently omitting it can cause wrong token display