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

Commit 877d5a9

Browse files
authored
Merge pull request #231 from Sparow199/master
docs(Altair): Add available Altair properties to Readme
2 parents c54d7f2 + 3821c3c commit 877d5a9

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,45 @@ to set the classpath resources that should be loaded.
211211

212212
Headers that are used when sending the GraphiQL queries can be set by defining them in the `graphiql.headers` group.
213213

214+
# Enable Altair
215+
216+
Altair becomes accessible at the root `/altair` if `altair-spring-boot-starter` is added as a dependency to a boot application.
217+
218+
Note that GraphQL server must be available at `/graphql/*` context to be discovered by Altair.
219+
220+
Available Spring Boot configuration parameters (either `application.yml` or `application.properties`):
221+
```yaml
222+
altair:
223+
mapping: /altair
224+
endpoint:
225+
graphql: /graphql
226+
subscriptions: /subscriptions
227+
subscriptions:
228+
timeout: 30
229+
reconnect: false
230+
static:
231+
basePath: /
232+
enabled: true
233+
pageTitle: Altair
234+
cdn:
235+
enabled: false
236+
version: 2.1.5
237+
props:
238+
resources:
239+
defaultQuery: defaultQuery.graphql
240+
variables: variables.graphql
241+
headers:
242+
Authorization: "Bearer <your-token>"
243+
```
244+
By default Altair is served from within the package. This can be configured to be served from CDN instead,
245+
by setting the property `altair.cdn.enabled` to `true`.
246+
247+
You are able to set the Altair props as well. The `altair.props.variables` group. Since setting (large) queries in the
248+
properties like this isn't very readable, you can use the properties in the `altair.props.resources` group
249+
to set the classpath resources that should be loaded.
250+
251+
Headers that are used when sending the Altair queries can be set by defining them in the `altair.headers` group.
252+
214253
# Supported GraphQL-Java Libraries
215254

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

0 commit comments

Comments
 (0)