feat(expr): enhance expr with JQ functionality#3191
Closed
karatakis wants to merge 34 commits intotailcallhq:mainfrom
Closed
feat(expr): enhance expr with JQ functionality#3191karatakis wants to merge 34 commits intotailcallhq:mainfrom
karatakis wants to merge 34 commits intotailcallhq:mainfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3191 +/- ##
==========================================
- Coverage 86.44% 85.34% -1.10%
==========================================
Files 282 285 +3
Lines 28756 29734 +978
==========================================
+ Hits 24858 25377 +519
- Misses 3898 4357 +459 ☔ View full report in Codecov by Sentry. |
* var tests * header tests * env tests * negative test
Contributor
Author
Benchmarks: before/after JQ Template
schema @server(port: 8000, hostname: "0.0.0.0") {
query: Query
}
type Query {
args(text: String!): String! @expr(body: "{{.args.text}}")
}request = function()
local headers = {}
headers["Content-Type"] = "application/json"
local body = [[
{
"query": "query { args(text: \"Hello, World!\") }"
}
]]
return wrk.format("POST", "/graphql", headers, body)
endBefore$ wrk -t12 -c400 -d30s -s bench.lua http://127.0.0.1:8000/graphql
Running 30s test @ http://127.0.0.1:8000/graphql
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 0.90ms 648.63us 10.81ms 75.83%
Req/Sec 35.51k 3.33k 46.54k 67.11%
12732725 requests in 30.04s, 1.67GB read
Requests/sec: 423842.17
Transfer/sec: 56.99MBAfter$ wrk -t12 -c400 -d30s -s bench.lua http://127.0.0.1:8000/graphql
Running 30s test @ http://127.0.0.1:8000/graphql
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 0.88ms 633.52us 9.94ms 76.60%
Req/Sec 36.78k 3.90k 48.32k 67.31%
13190038 requests in 30.05s, 1.73GB read
Requests/sec: 439007.72
Transfer/sec: 59.03MB |
tusharmath
reviewed
Dec 10, 2024
tusharmath
reviewed
Dec 10, 2024
tusharmath
reviewed
Dec 10, 2024
tusharmath
reviewed
Dec 10, 2024
tusharmath
reviewed
Dec 10, 2024
tusharmath
reviewed
Dec 10, 2024
* JqTransformer is part of Mustache * Mustache is a superset of JqTransform * Remove compiled filters storage
|
Action required: PR inactive for 5 days. |
|
Action required: PR inactive for 5 days. |
|
Action required: PR inactive for 5 days. |
|
PR closed after 10 days of inactivity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
@exprdirectives andselectoperations.Broken changes:
selectargument of@http, ...directives we cannot prepend the .args selector. So the users have to manually add it if they use Jq features only.From:
Becomes
Example:
Build & Testing:
cargo testsuccessfully../lint.sh --mode=fixto fix all linting issues raised by./lint.sh --mode=check.Checklist:
<type>(<optional scope>): <title>