Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: GraphQL client: add section about adding headers from the configuration for the typesafe client #44293

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading