graphql-server

module
v0.0.0-...-a3df188 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2026 License: BSD-2-Clause

README

graphql-server

License
GitHub action codecov
Maintainability
Last commit Funding

dictyBase GraphQL server. This uses glqgen to generate code to match our gRPC models.

Usage

NAME:
   graphql-server - cli for graphql-server backend

USAGE:
   graphql-server [global options] command [command options] [arguments...]

VERSION:
   1.0.0

COMMANDS:
     start-server  starts the graphql-server backend
     help, h       Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --log-format value  format of the logging out, either of json or text. (default: "json")
   --log-level value   log level for the application (default: "error")
   --help, -h          show help
   --version, -v       print the version

Subcommand

NAME:
   graphql-server start-server - starts the graphql-server backend

USAGE:
   graphql-server start-server [command options] [arguments...]

OPTIONS:
   --user-grpc-host value, --uh value        user grpc host [$USER_API_SERVICE_HOST]
   --user-grpc-port value, --up value        user grpc port [$USER_API_SERVICE_PORT]
   --role-grpc-host value, --rh value        role grpc host [$ROLE_API_SERVICE_HOST]
   --role-grpc-port value, --rp value        role grpc port [$ROLE_API_SERVICE_PORT]
   --permission-grpc-host value, --ph value  permission grpc host [$PERMISSION_API_SERVICE_HOST]
   --permission-grpc-port value, --pp value  permission grpc port [$PERMISSION_API_SERVICE_PORT]
   --publication-api value, --pub value      publication api endpoint (default: "https://betafunc.dictybase.org/publications") [$PUBLICATION_API_ENDPOINT]
   --stock-grpc-host value, --sh value       stock grpc host [$STOCK_API_SERVICE_HOST]
   --stock-grpc-port value, --sp value       stock grpc port [$STOCK_API_SERVICE_PORT]
   --order-grpc-host value, --oh value       order grpc host [$ORDER_API_SERVICE_HOST]
   --order-grpc-port value, --op value       order grpc port [$ORDER_API_SERVICE_PORT]
   --auth-enabled                            enable logto jwt auth middleware and management client [$AUTH_ENABLED]
   --auth-api-endpoint value                 base http url of logto authentication api endpoint [$AUTH_ENDPOINT]
   --app-id value                            api identifier [$APPLICATION_ID]
   --app-secret value                        secret to access the authentication api [$APPLICATION_SECRET]
   --jwks-uri value                          url to retrieve JWK public key set [$JWKS_PUBLIC_URI]
   --jwt-issuer value                        expected jwt issuer of the token [$JWT_ISSUER]
   --jwt-audience value                      expect jwt audience of the token [$JWT_AUDIENCE]

Authentication is optional. With --auth-enabled unset or false (the default) the server starts without any Logto dependencies — the JWKS endpoint is never fetched and no Logto credentials are required; resolvers that need the Logto management API (user/permission lookups) return an authentication is disabled error instead. With --auth-enabled set to true, all six auth flags above become required and the JWT middleware is active, matching the previous behavior.


## Development

[Full development guide](./docs/development.md) available in the `docs` folder.

In order to use the GraphQL Playground, you will need to add the following custom HTTP header:

```json
{
  "X-GraphQL-Method": "Query"
}

Misc badges

Issues Open Issues Closed Issues
Total PRS Open PRS Closed PRS Merged PRS
Commits Branches Tags
GitHub repo size GitHub code size in bytes Lines of Code

Directories

Path Synopsis
cmd
graphql-server command
internal
graphql/resolver
Package resolver contains the GraphQL resolvers for the stock service.
Package resolver contains the GraphQL resolvers for the stock service.
graphql/resolverutils
Package resolverutils provides utility functions for GraphQL resolvers, including functions to convert GraphQL filters into query strings for database queries.
Package resolverutils provides utility functions for GraphQL resolvers, including functions to convert GraphQL filters into query strings for database queries.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL