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

Implementation of support for different transports (other than Http) #15

Conversation

DaveRMaltby
Copy link
Contributor

The goal here is to have integration tests that still use the full Hot Chocolate pipeline, but don't require a TCP endpoint to be stood up. Besides avoiding the network layer here, it further avoids having to have a background service (or process) running the server-side of things and (if your GraphQL requires it) removes authentication issues as well.

var variables = ({context.RequestExecutorInputSymbol.ToGlobalName()})variablesObject;
var qlResponse = await qlClient.QueryPipeline.ExecuteAsync<{context.QueryTypeName}>(qlClient.Transport, queryKey, variablesObject, queryRequest =>
{{
if (qlClient.Transport is HttpTransport)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not happy about having a special condition here just for the HttpTransport, but with the code generation involved here on line 54, creating an abstraction that the HttpTransport instance would have to call into seemed more complicated (but still workable, if you would like the extra efforts)

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.

None yet

2 participants