Skip to content

Commit 4900b2a

Browse files
authored
Merge pull request #44293 from jmini/patch-5
docs: GraphQL client: add section about adding headers from the configuration for the typesafe client
2 parents c877cfd + 8a88f0c commit 4900b2a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/src/main/asciidoc/smallrye-graphql-client.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ that the target of the client is the application that is being tested (typically
230230
This is useful if your application contains a GraphQL server-side API as well as a GraphQL client that is used for
231231
testing the API.
232232

233+
If you need to add an authorization header, or any other custom HTTP header (in our case
234+
it's not required), this can be done with a configuration in the configuration file as well:
235+
----
236+
quarkus.smallrye-graphql-client.star-wars-typesafe.header.HEADER-KEY=HEADER-VALUE
237+
----
238+
233239
`star-wars-typesafe` is the name of the configured client instance, and corresponds to the `configKey`
234240
in the `@GraphQLClientApi` annotation. If you don't want to specify a custom name, you can leave
235241
out the `configKey`, and then refer to it by using the fully qualified name of the interface.

0 commit comments

Comments
 (0)