Configuration

The configuration of the GraphQL service is in the file <DENODO_HOME>/resources/apache-tomcat/webapps/denodo-graphql-service/WEB-INF/classes/application.properties:

In this file you can modify the following properties:

  • cors.allowed-origins: This service supports Cross-origin resource sharing (CORS). The section Cross-origin Resource Sharing (CORS) (settings of published REST web services) explains what CORS is. By default, the value of the property cors.allowed-origins is *. This means that the Service allows CORS requests received from any domain. To limit the domains from which CORS requests are allowed, change the value of this property: replace * with the list of allowed URLs (separate each URL by a comma). For example, http://foo.com, https://foo.bar.com.

  • graphql.enable.filtering: If true, user is allowed to sort data, specify complex filters, group results and calculate aggregation functions in the GraphQL queries. If false the user is only allowed to use GraphQL standard features. Default is true.

  • graphql.max.query.complexity: GraphQL Service prevents the execution of the query if its complexity is greater than the value specified by this property. The complexity is calculated using this formula: 1 + childComplexity. Default is 200.

  • graphql.max.query.depth: GraphQL Service prevents the execution of the query if its depth is greater than the value specified by this property. Default is 5.

  • graphql.endpoint: Default is /graphql.

  • query.default-page-size: Number of results returned per query. If -1 all results are retrieved. Default is 1000.

  • vdp.datasource.driverClassName: The full package name of the Denodo driver class. Its value is com.denodo.vdp.jdbc.Driver and should not be modified.

  • vdp.datasource.jdbcUrl: The database URI to access Denodo from the GraphQL Service. Default is jdbc:vdb://localhost:<PORT>/?noAuth=true and should not be modified unless the Virtual DataPort server’s ports are modified after the installation.

  • vdp.admin.user.enabled: If false the user account admin (not other administrator accounts) will not be able to access the GraphQL Service. This functionality can be used only with HTTP Basic authentication. Default is false.

SSL/TLS

For enabling HTTPS in the Denodo GraphQL Service you have to add Spring Boot server.ssl.* properties to the configuration file. For example:

# custom port instead of the default 8085
server.port=8443

# path to the key store that holds the SSL certificate
server.ssl.key-store=path_to_keystore.jks

# password used to generate the certificate
server.ssl.key-store-password=secret

# password to access the key in the key store
server.ssl.key-password=another-secret

GZIP

The GraphQL website recommends that any production GraphQL service enable GZip compression and encourage their clients to send the header Accept-Encoding: gzip.

Depending on your scenario, compressing the JSON response can increase the performance or not. If it turns out that it is an effective strategy, you can enable GZip in the GraphQL Service by adding the Spring Boot server.compression.* properties to the configuration file. For example:

# enable response compression
server.compression.enabled=true

# comma-separated list of mime types that should be compressed
server.compression.mime-types=application/json, application/graphql