class
Analyzer::Specification::Hasura
- Analyzer::Specification::Hasura
- Analyzer
- Reference
- Object
Overview
Hasura does not generate per-table REST routes. A tracked table
becomes a set of GraphQL root fields on POST /v1/graphql; the only
REST surface is whatever metadata/rest_endpoints.yaml declares.
Emitting /api/rest/<table> would invent endpoints that 404.
Rather than re-deriving GraphQL handling, each tracked table is
rendered as a small SDL document and handed to GraphqlSdlParser.
That yields the fragment URL convention (/v1/graphql#Query.movies),
a runnable operation document per field, and input-object expansion
into dotted params — all of which the SDL analyzer already does.
Included Modules
Defined in:
analyzer/analyzers/specification/hasura.crConstant Summary
-
GRAPHQL_IDENTIFIER =
/\A[A-Za-z_][A-Za-z0-9_]*\z/ -
Column names must be valid GraphQL identifiers to appear in the synthesized SDL.
-
GRAPHQL_PATH =
"/v1/graphql" -
PERMISSION_KEYS =
{"select_permissions", "insert_permissions", "update_permissions", "delete_permissions"} -
Hasura's metadata carries no column list of its own; column-level permissions are the only place columns are named.
-
REST_PREFIX =
"/api/rest" -
TAG_SOURCE =
"hasura_analyzer"