You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Inconsistent interpolation behavior in various parts of the configuration. In current state, when endpoint has one or more parameters, the parameters can be used in url_pattern freely. When using endpoint parameters in backend/graphql variables, it is not possible to have a string containing multiple parameters as in url_pattern.
With url_pattern the logic is reversed and all parameters are replaced in one go by transforming {paramater} to a Go template variable {{ .parameter }}.
Expected behavior
Endpoint parameter interpolation will work consistently in all elements of configuration where parameters are allowed to be used. In above example, is this part: "query": "repo:{owner}/{repo} category:Announcements label:component:rollout"
Logs
No logs, as there are no errors in this use case. Just a bad query is passed to graphql request, but returning empty result.
Additional context
GraphQL doesn't have string interpolation and this functionality will help preparing variables before being passed to the GraphQL request.
The text was updated successfully, but these errors were encountered:
For historical reasons, params are capitalized during its extraction (at the beginning of this project, url patterns were treated as templates). Once the reason was removed, we couldn't change that behavior because there are several other components and extensions than relies on that convention.
We can keep this idea for the future 3.0 version, where we can break compatibility.
Describe the bug
Inconsistent interpolation behavior in various parts of the configuration. In current state, when endpoint has one or more parameters, the parameters can be used in
url_pattern
freely. When using endpoint parameters inbackend/graphql
variables, it is not possible to have a string containing multiple parameters as inurl_pattern
.I believe the bug is in
lura/transport/http/client/graphql/graphql.go
Lines 97 to 105 in faec9df
With
url_pattern
the logic is reversed and all parameters are replaced in one go by transforming{paramater}
to a Go template variable{{ .parameter }}
.lura/config/config.go
Line 579 in faec9df
To Reproduce
Steps to reproduce the behavior:
endpoint configuration
Expected behavior
Endpoint parameter interpolation will work consistently in all elements of configuration where parameters are allowed to be used. In above example, is this part:
"query": "repo:{owner}/{repo} category:Announcements label:component:rollout"
Logs
No logs, as there are no errors in this use case. Just a bad query is passed to graphql request, but returning empty result.
Additional context
GraphQL doesn't have string interpolation and this functionality will help preparing variables before being passed to the GraphQL request.
The text was updated successfully, but these errors were encountered: