with one click
schema-update
// Use when updating the SDK GraphQL schema from a local or staging API server
// Use when updating the SDK GraphQL schema from a local or staging API server
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | schema-update |
| description | Use when updating the SDK GraphQL schema from a local or staging API server |
| metadata | {"author":"aave"} |
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 transformToNullableBigDecimalIMPORTANT: 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 completeConverted and distributed by TomeVault — claim your Tome and manage your conversions.