This handler allows you to use GraphQL schema created by PostGraphile, based on a PostgreSQL database schema.
To get started, install the handler library from NPM:
Now, you can use it directly in your Mesh config file:
You can check out our example that uses schema stitching with a PostgreSQL datasource. Click here to open the example on GitHub
You can add PostGraphile plugins such as FederationPlugin and ConnectionFilterPlugin. You can install it using npm or yarn like below;
and add those in your configuration file;
FederationPluginonly if you are using
federationas merger as in Federation Recipe
String) - A connection string to your Postgres database
Array of String, required) - An array of strings which specifies the PostgreSQL schemas that PostGraphile will use to create a GraphQL schema. The default schema is the public schema.
Any) - Connection Pool instance or settings or you can provide the path of a code file that exports any of those
Array of String) - Extra Postgraphile Plugins to append
Array of String) - Postgraphile Plugins to skip (e.g. "graphile-build#NodePlugin")
options- - Extra Postgraphile options that will be added to the postgraphile constructor. It can either be an object or a string pointing to the object's path (e.g. "./my-config#options"). See the postgraphile docs for more information. One of:
Boolean) - Enable GraphQL websocket transport support for subscriptions (default: true)
Boolean) - Enables live-query support via GraphQL subscriptions (sends updated payload any time nested collections/records change) (default: true)