Analyzer::Elixir::Absinthe
Inherits Analyzer::Elixir::ElixirEngine < FileScanEngine < Analyzer < FileHelper < Reference < Object
Absinthe (https://hexdocs.pm/absinthe) code-first GraphQL schemas. Each
root field — field inside a schema's query/mutation/subscription
block, an extend object(:query) block, or an object pulled in with
import_fields — becomes one endpoint in the shape the SDL analyzers emit.
The root blocks live in the use Absinthe.Schema module while the
imported objects usually sit in use Absinthe.Schema.Notation modules in
other files, so every file is collected first and the imports are
resolved globally afterwards.
Constants
Absinthe.Schema's @default_query_name and siblings.
extend object(:query) do / extend object :mutation do.
field :posts, … or Absinthe.Relay's connection field :posts, node_type: :post.
forward "/api", Absinthe.Plug, schema: … (Phoenix) or
forward "/api", to: Absinthe.Plug, … (Plug.Router). The GraphiQL
plug (Absinthe.Plug.GraphiQL) is the IDE, not the API mount.
Arguments Absinthe.Relay adds to every connection field.
query do / query name: "RootQuery" do / mutation(name: "M") do,
matched on the string-stripped line (the name is read off the raw one).
Class methods
Instance methods
Collection replaces the per-file walk; analyze drives everything.
Instance-side view of the same declaration. The per-file rescues live on
this base class, which has no way to name the analyzer that is running
inside them, so a skipped file could not be attributed to a tech.
Deriving it from analyzer_for keeps the name written exactly once.