Skip to main content

Module schema

Module schema 

Source
Expand description

Derived GraphQL-schema representations for GetIntrospectionSchema.

AppSync’s real GetIntrospectionSchema returns the API’s schema either as SDL text or as a JSON introspection document. fakecloud stores the raw SDL ingested by StartSchemaCreation; this module derives the requested representation from it:

  • SDL -> the stored SDL document verbatim.
  • JSON -> a deterministic JSON skeleton that lists the type names parsed out of the SDL under a __schema.types array. This is a faithful, honestly-scoped projection of the stored schema, NOT a full GraphQL introspection response (field/arg/directive graphs are not reconstructed).

Functions§

introspection_bytes
Build the schema representation bytes for the requested format.
type_names
Extract the top-level type names declared in an SDL document. Recognises the type, input, enum, interface, union, and scalar keywords. This is a lightweight lexical scan, sufficient to project a deterministic type list.