Skip to content

GetIntrospectionSchema

Source: src/AWS/AppSync/GetIntrospectionSchema.ts

Runtime binding for appsync:GetIntrospectionSchema — read a GraphqlApi’s live schema (SDL or introspection JSON) from a Lambda (or other AWS runtime), e.g. for schema registries, codegen services, or federation gateways that discover the schema at runtime.

The response schema is a streaming body — collect it with Stream.mkString(Stream.decodeText(response.schema!)). Provide AppSync.GetIntrospectionSchemaHttp on the hosting function’s Effect to implement the binding.

const getSchema = yield* AppSync.GetIntrospectionSchema(api);
const response = yield* getSchema({ format: "SDL" });
const sdl = yield* Stream.mkString(Stream.decodeText(response.schema!));