Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 5e9de57

Browse files
committed
Adding documentation to README.md for GraphQL Voyager configuration options and default behaviour
1 parent f3410c2 commit 5e9de57

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,62 @@ You can configure the query, variables, headers and even supply sample responses
433433
, `variables` and `responses` are expected to be resources of the appropriate format (GraphQL
434434
for `query`, JSON for `variables` and `responses`).
435435

436+
437+
# Enable GraphQL Voyager
438+
439+
**GraphQL Voyager** becomes accessible at root `/voyager` (or as configured
440+
in `voyager.mapping`)
441+
if `voyager-spring-boot-starter` is added as a dependency to a boot application.
442+
443+
Available Spring Boot configuration parameters (either `application.yml`
444+
or `application.properties`):
445+
446+
```yaml
447+
voyager:
448+
enabled: true
449+
basePath: /
450+
mapping: /voyager
451+
endpoint: /graphql
452+
cdn:
453+
enabled: false
454+
version: 1.0.0-rc.31
455+
pageTitle: Voyager
456+
displayOptions:
457+
skipRelay: true
458+
skipDeprecated: true
459+
rootType: Query
460+
sortByAlphabet: false
461+
showLeafFields: true
462+
hideRoot: false
463+
hideDocs: false
464+
hideSettings: false
465+
```
466+
467+
## Basic settings
468+
469+
`mapping` and `endpoint` will default to `/voyager` and `/graphql`, respectively. Note that these values may not be empty.
470+
471+
`enabled` defaults to `true`, and therefor **GraphQL Voyager** will be available by default if the dependency
472+
is added to a Spring Boot Web Application project.
473+
474+
`pageTitle` defaults to `Voyager`.
475+
476+
All other properties default to the same as documented on the official [GraphQL Voyager readme](https://github.com/APIs-guru/graphql-voyager#properties)
477+
478+
## CDN
479+
480+
The currently bundled version is `1.0.0-rc31`, which is - as of writing this - the latest release
481+
of **GraphQL Voyager**. The CDN option uses `jsDelivr` CDN, if enabled. By default, it will
482+
load the latest available release. Available CDN versions can be found on the project's
483+
[jsDelivr page](https://www.jsdelivr.com/package/npm/graphql-voyager). The CDN option is
484+
disabled by default.
485+
486+
## Customizing GraphQL Voyager
487+
488+
Further **GraphQL Voyager** `displayOptions`, `hideDocs` and `hideSettings` customizations can be configured, as documented in the official
489+
[GraphQL Voyager readme](https://github.com/APIs-guru/graphql-voyager#properties).
490+
491+
436492
# Supported GraphQL-Java Libraries
437493

438494
The following libraries have auto-configuration classes for creating a `GraphQLSchema`.

0 commit comments

Comments
 (0)