A GraphQL interface for querying and serving linked data on the Web.
This section describes how to run an instance of HyperGraphQL in a container, such as Amazon Web Services ElasticBeanstalk, as well as how to configure these from remote locations, such as Amazon Web Services S3.
Although this documentation discusses AWS, the general principles can be applied to any container and storage mechanism.
The configuration parameters are used to point at the location of configuration files. These files can reside in a number of places:
Command-line parameters are:
NB: parameters can be specified as -<parameter>
or --<parameter>
-classpath
- (Optional) - If present, look for the configuration files on the classpath
-config
- (Either this or the --s3
parameter must be present) - location(s) of the configuration files -
can be a directory, a file or a list of files, e.g.:
-config /hgql/config
-config /hgql/config/config1.json
-config /hgql/config/config1.json /hgql/config/config2.json
-s3
- (Required if --config
isn’t provided) - Location of a configuration file on AWS S3
-u
- (Required if --s3
is set) - accessKey
-p
- (Required if --s3
is set) - accessSecretKey
-nobanner
- (Optional) - omit banner on startup
hgql_config
- (Required) - where to look for configuration - S3, URL or filesystem
hgql_username
- (Optional) - Username / accessKey for remote config resource
hgql_password
- (Optional) - Password / accessSecretKey for remote config resource
java [-Xmx<val>] -jar hypergraphql-<version>-exe.jar [<args>]
-X
options can be used to apply various memory options to the JVM see JVM Memory
and Baeldung for a non-comprehensive listargs
list optionally points to configuration resourceshttp://<container>:<port>/graphiql
The demos on this site run in an Elastic Beanstalk instance.
They were deployed in a ZIP file with the structure:
/___hypergraph-1.0.2-exe.jar
|__Procfile
|__demo_services
|__agrovoc.json
|__config1.json
|__config2.json
|__config3.json
|__config4.json
|__fao.ttl
|__schema1.json
|__schema2.json
|__schema3.json
|__schema4.json
The config
and schema
files are those described in the [Demo] (/demo/) and [Tutorial] (/tutorial/) sections.
Procfile
looks like:
web: java -jar -Xmx1024 hypergraphql-1.0.3-exe.jar -config demo_services