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

Support for dynamic headers on GraphQL clients #1919

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

jmartisk
Copy link
Member

@jmartisk jmartisk commented Sep 20, 2023

Preparation for OIDC client integration (quarkusio/quarkus#35878)
Quarkus-side part of the integration: https://github.com/jmartisk/quarkus/tree/oidc-token

@jmartisk jmartisk requested a review from sberyozkin September 20, 2023 12:16
Copy link

@sberyozkin sberyozkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a GraphQL expert, but the update to the typesafe client to support dynamic headers looks sound and hopefully will be of use not only for OIDC client integrations, LGTM

@jmartisk jmartisk marked this pull request as ready for review September 21, 2023 07:42
@jmartisk jmartisk merged commit 00154aa into smallrye:main Sep 21, 2023
5 checks passed
@jmartisk jmartisk deleted the oidc-token branch September 21, 2023 07:49
@t1
Copy link
Collaborator

t1 commented Sep 22, 2023

Sorry for taking so long to take a look. This adds a dependency on Vert.x to the Typesafe Client APIs. I understand that the mvn dependency had been introduced for the dynamic client, but if we try to promote the Typesafe Client APIs to MP, we would have to break the API.

And there are not tests 😢

@jmartisk
Copy link
Member Author

Sorry for taking so long to take a look. This adds a dependency on Vert.x to the Typesafe Client APIs. I understand that the mvn dependency had been introduced for the dynamic client, but if we try to promote the Typesafe Client APIs to MP, we would have to break the API.

There's no Vert.x dependency, you probably mean Mutiny. However, you may be right that perhaps we can keep it only in the vertx-implementation of the builder and move it out of the general builder... Actually, turns out I accidentally added the dynamicHeader method to the TypesafeGraphQLClientBuilder but not DynamicGraphQLClientBuilder, so I'll remove it. Good point.

And there are not tests 😢

Tests with an actual OIDC client are on the Quarkus side of the integration. If you want to provide some more general tests, please do :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants