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
If you want to run Hasura in Subsquid Cloud, visit the hasura
addon page.
When running it elsewhere, simply supply database credentials in your Hasura configuration. For squids running in Subsquid Cloud you can find the credentials in the Cloud app.