Analyzer::Specification::GraphqlSdlParser
Shared GraphQL SDL parser. Extracted from GraphqlSdl so other
analyzers (Apollo Server's inline gql\...`` typeDefs, Yoga, etc.)
can produce the same field-per-endpoint shape without re-implementing
the SDL grammar.
Constants
Root operation type → GraphQL operation keyword.
All operations ride on POST (Noir's URL optimizer dedupes on method+url and
the HTTP method allowlist doesn't include WS); subscriptions are flagged
via endpoint.protocol = "ws" and a tag instead.
Instance methods
One root field of a code-first schema (Strawberry, Graphene,
HotChocolate, graphql-ruby, Absinthe), which has no SDL to parse: the
host analyzer collects the field itself and gets the same endpoint shape
as an SDL field. root_kind is "Query", "Mutation" or "Subscription";
type_name is the schema's name for that root when it differs.
Parse an SDL document and return one endpoint per Query/Mutation/Subscription
field. line_offset shifts every reported line number — used by host
analyzers (e.g. Apollo Server) whose SDL is embedded in a larger file.