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

Metadata HTTP forwarding #81

Open
FrancoisChastel opened this issue Aug 7, 2019 · 3 comments
Open

Metadata HTTP forwarding #81

FrancoisChastel opened this issue Aug 7, 2019 · 3 comments

Comments

@FrancoisChastel
Copy link

Hello All !

I am currently planning to use rejoiner for exposing a single HTTP endpoint for a public API on one of my project.

In this context, I need to be able to retrieve the usual metadata which is inside an HTTP request (user-agent,etc...).

After looking quickly in the code I couldn't find any mention of it in the codebase.

  • Does rejoiner forward the HTTP metadata to the gRPC metadata ?
@sheepdreamofandroids
Copy link
Contributor

sheepdreamofandroids commented Aug 15, 2019

Rejoiner doesn't. It cannot know what metadata is important to you and how it should be transmitted.

But in your endpoint, which can be a standard servlet, you can collect any metadata you like into an object of your choice and stick it into the ExecutionInput as "context". This context is available in any @Query or @SchemaModification annotated method from the DataFetchingEnvironment parameter.

@siderakis
Copy link
Member

@FrancoisChastel Did that answer you question? How would you like it to work? Is there something we can automate?

@FrancoisChastel
Copy link
Author

@siderakis I think having in the query in the gRPC-side something like a context object in the proto-definition of the services which contains the usual HTTP metadata as mentioned would be a great improvement, we could have a seamless experience of the rejoiner integration with the HTTP-Rest "world"

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

No branches or pull requests

3 participants