module InternalGraphqlParser

Overview

Parses GraphQL operation documents (query Foo { ... }, mutation Bar { ... }, subscription Baz { ... }) carried in .graphql files and emits one /graphql endpoint per named top-level operation.

SDL schema documents are handled separately by the graphql_sdl analyzer; this analyzer deliberately reports nothing for them.

Defined in:

analyzer/analyzers/file_analyzers/graphql_analyzer.cr

Constant Summary

OPERATION_KEYWORDS = {"query", "mutation", "subscription"}

Keywords that introduce a top-level operation definition.

Class Method Summary

Class Method Detail

def self.parse_content(path : String, file_content : String) : Array(Endpoint) #

[View source]