بنقرة واحدة
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