Rust + Hasura
This is an example of a Rust server that functions as a remote schema for Hasura.
- user login + signup
- JWT authorization w/ refresh cookie
- typesafe GraphQL requests
- uuid package integration
You can learn more about this stack from this talk.
- Your Hasura schema must have a table
user, with a
idcolumn of type
uuid, and also a
usernamecolumn of type
- Set an
JWT_SECRETon the graphql engine, and share these with the Rust server as environment variables.
- Use graphqurl to generate
gq $HASURA_ENDPOINT -H "x-hasura-admin-secret: $ADMIN_SECRET" --introspect --format json > ./graphql/schema.json