Expand description
GraphQL introspection → CLI commands → execute.
Introspection results are cached like OpenAPI ($SKIFF_CACHE_DIR). Use
--fields to override the auto-built selection set.
Constants§
- GRAPHQL_
INTROSPECTION_ QUERY - Fixed introspection query (parity with Python mcp2cli).
Functions§
- build_
graphql_ document - Build document + variables from parsed CLI args.
- build_
selection_ set - Auto-generate a selection set (depth 2 = scalars + one nested object level).
INTERFACE/UNION fields emit
__typename(+ interface scalar fields when present). - execute_
graphql - Execute a GraphQL operation and print the result.
- extract_
graphql_ commands - Convert introspection
__schemainto CLI commands. - graphql_
type_ string - Reconstruct GraphQL type notation, e.g.
[String!]!. - graphql_
type_ to_ python - Map GraphQL type → (CLI ParamType, required, choices).
- load_
graphql_ schema - POST introspection query to a GraphQL endpoint, with caching.
- unwrap_
type - Unwrap NON_NULL/LIST wrappers. Returns (named_type, is_non_null, is_list).
- validate_
required_ graphql_ args - After flags + stdin merge, ensure NON_NULL GraphQL args are present.