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

[TT-12643] PoC - Transport solution in tyk-gql #6453

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

buraksezer
Copy link
Contributor

@buraksezer buraksezer commented Aug 7, 2024

Proof of concept implementation for TT-12643. A detailed analysis can be found here: https://tyktech.atlassian.net/wiki/spaces/EN/pages/2619899962/TT-12643+-+PoC+Transport+solution+in+tyk-gql

Related PR in tyk-gql: https://github.com/TykTechnologies/tyk-gql/pull/3

Copy link
Contributor

github-actions bot commented Aug 7, 2024

API Changes

--- prev.txt	2024-08-07 14:23:18.722005302 +0000
+++ current.txt	2024-08-07 14:23:08.977948690 +0000
@@ -1271,10 +1271,11 @@
 type GraphQLConfigVersion string
 
 const (
-	GraphQLConfigVersionNone     GraphQLConfigVersion = ""
-	GraphQLConfigVersion1        GraphQLConfigVersion = "1"
-	GraphQLConfigVersion2        GraphQLConfigVersion = "2"
-	GraphQLConfigVersion3Preview GraphQLConfigVersion = "3-preview"
+	GraphQLConfigVersionNone      GraphQLConfigVersion = ""
+	GraphQLConfigVersion1         GraphQLConfigVersion = "1"
+	GraphQLConfigVersion2         GraphQLConfigVersion = "2"
+	GraphQLConfigVersion3Preview  GraphQLConfigVersion = "3-preview"
+	GraphQLConfigVersionProxyOnly GraphQLConfigVersion = "proxy-only"
 )
 type GraphQLEngineConfig struct {
 	FieldConfigs  []GraphQLFieldConfig      `bson:"field_configs" json:"field_configs"`
@@ -9459,6 +9460,18 @@
 	ApplyPolicies []string `json:"apply_policies"`
 }
 
+type ProxyOnlyGraphQLMiddleware struct {
+	*BaseMiddleware
+}
+
+func (m *ProxyOnlyGraphQLMiddleware) EnabledForSpec() bool
+
+func (m *ProxyOnlyGraphQLMiddleware) Init()
+
+func (m *ProxyOnlyGraphQLMiddleware) Name() string
+
+func (m *ProxyOnlyGraphQLMiddleware) ProcessRequest(w http.ResponseWriter, r *http.Request, _ interface{}) (error, int)
+
 type ProxyResponse struct {
 	Response *http.Response
 	// UpstreamLatency the time it takes to do roundtrip to upstream. Total time

Copy link

sonarqubecloud bot commented Aug 7, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

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.

1 participant