Expand description
Schema ingestion: a source string is either an http(s) URL (introspect)
or a path to an SDL file. Both produce the same SchemaRecord list, so
nothing downstream cares which it was. When no source is given,
discover finds a schema in the current directory tree.
Modules§
- introspect
- Load a schema by introspection — from a live endpoint (POST the standard
introspection query) or a local introspection JSON dump. Both flatten the
__schemapayload into the sameSchemaRecords that SDL produces. - sdl
- Parse GraphQL SDL and flatten every definition into
SchemaRecords.
Structs§
- Load
Options - Options that shape loading. Only URL introspection consults them; file and SDL sources ignore them.
Functions§
- discover
- Find a schema when none was passed: walk the current directory tree for
schema documents (not operation docs), preferring
.graphqls, then aschema.*file, then any.graphql/.gqlwhose contents look like SDL. Nearest (shallowest) wins; other candidates elsewhere are reported. - load
- Load a schema from a file path or an http(s) URL and flatten it to records.