Alternatives to the SDK GraphQL server
We encourage using squids with third-party GraphQL tools like PostGraphile and Hasura. No special configuration is required and there aren't any constraints on running them in Subsquid Cloud.
PostGraphile
Here we cover one possible way of integrating PostGraphile into a squid project (full example). Note the following:
-
There is a dedicated entry point for PostGraphile (
src/api.ts
). It is complemented by ansqd
command and a manifest entry. This makes it easier to run the squid both locally (withsqd run
) and in Cloud. -
As per usual with PostGraphile installations, you can freely extend it with plugins, including your own. Here is an example plugin for serving the
_squidStatus
queries from the standard Squid SDK GraphQL server schema.
Hasura
Although it is possible to run Hasura in Subsquid Cloud, we expect most Hasura setups to host their GraphQL servers elsewhere to avoid unnecessary credentials sharing. If you want to run it in Subsquid Cloud, let us know in SquidDevs Telegram chat.
Otherwise, simply supply the database credentials from the Subsquid Cloud console in your Hasura configuration.