Skip to content

Commit

Permalink
Update smallrye-graphql-client.adoc
Browse files Browse the repository at this point in the history
  • Loading branch information
jmini committed Nov 5, 2024
1 parent 4a41afc commit 928058f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/src/main/asciidoc/smallrye-graphql-client.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,18 @@ 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.

Be aware that the `endpoint` parameter in `@GraphQLClientApi` will win over the configuration in the `application.properties` file.

`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.

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
----

Now that we have the client instance properly configured, we need a way to have it
perform something when we start the application. For that, we will use a REST endpoint that,
when called by a user, obtains the client instance and lets it execute the query.
Expand Down

0 comments on commit 928058f

Please sign in to comment.