class
Analyzer::Javascript::GraphqlYoga
Overview
GraphQL Yoga analyzer.
Yoga (The Guild stack) embeds its schema as an SDL string inside
createSchema({ typeDefs }), and exposes the HTTP mount via the
graphqlEndpoint option of createYoga(...). The host runtime
(Node http, Express, Hono, Bun, Cloudflare Workers, …) only affects
the base path; framework-specific analyzers already cover the
mounting side, so this analyzer focuses on the SDL → endpoint
translation and the graphqlEndpoint override.
The Apollo analyzer's mechanism is reused almost verbatim — both
servers carry typeDefs as a backtick template literal — so the only
Yoga-specific work here is reading graphqlEndpoint for the mount.
Defined in:
analyzer/analyzers/javascript/graphql_yoga.crConstant Summary
-
DEFAULT_GRAPHQL_PATH =
"/graphql" -
YOGA_HINTS =
["graphql-yoga", "createYoga"] -
Cheap content hints used to gate the heavier SDL extraction.