Skip to main content

Write REST endpoints

The root functions, the ones we expose from our typegraphs, are served through a GraphQl API over HTTP. In addition, we can also expose REST APIs using the rest method. The method takes GraphQl queries and provides RESTly endpoints for them.

Loading...

The effect of the root function accessed in the query determines the HTTP verb used, and the mapping can be found here.

There's also an OpenAPI schema generated from the rest endpoints served under {typegate_url}/{typegraph}/rest/_schema. A browser-based explorer for the OpenAPI schema is served under {typegate_url}/{typegraph}/rest as well.

You can refer to the REST reference section for more information.