Skip to content

Commit

Permalink
Merge pull request quarkusio#44293 from jmini/patch-5
Browse files Browse the repository at this point in the history
docs: GraphQL client: add section about adding headers from the configuration for the typesafe client
  • Loading branch information
jmartisk authored Nov 6, 2024
2 parents c877cfd + 8a88f0c commit 4900b2a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/src/main/asciidoc/smallrye-graphql-client.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@ that the target of the client is the application that is being tested (typically
This is useful if your application contains a GraphQL server-side API as well as a GraphQL client that is used for
testing the API.

If you need to add an authorization header, or any other custom HTTP header (in our case
it's not required), this can be done with a configuration in the configuration file as well:
----
quarkus.smallrye-graphql-client.star-wars-typesafe.header.HEADER-KEY=HEADER-VALUE
----

`star-wars-typesafe` is the name of the configured client instance, and corresponds to the `configKey`
in the `@GraphQLClientApi` annotation. If you don't want to specify a custom name, you can leave
out the `configKey`, and then refer to it by using the fully qualified name of the interface.
Expand Down

0 comments on commit 4900b2a

Please sign in to comment.