-
Notifications
You must be signed in to change notification settings - Fork 257
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
feat(expr): enhance expr with JQ functionality #3191
Open
karatakis
wants to merge
32
commits into
tailcallhq:main
Choose a base branch
from
karatakis:feat/jq-template-hybrid
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
github-actions
bot
added
the
type: feature
Brand new functionality, features, pages, workflows, endpoints, etc.
label
Dec 3, 2024
karatakis
changed the title
feat(mustache): enhance mustache with JQ funtionality
feat(expr): enhance expr with JQ funtionality
Dec 5, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3191 +/- ##
==========================================
- Coverage 86.78% 85.65% -1.13%
==========================================
Files 281 284 +3
Lines 28443 29421 +978
==========================================
+ Hits 24683 25202 +519
- Misses 3760 4219 +459 ☔ View full report in Codecov by Sentry. |
tusharmath
changed the title
feat(expr): enhance expr with JQ funtionality
feat(expr): enhance expr with JQ functionality
Dec 9, 2024
* var tests * header tests * env tests * negative test
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)
end Before$ 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.99MB After$ 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ci: benchmark
Runs benchmarks
type: feature
Brand new functionality, features, pages, workflows, endpoints, etc.
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:
@expr
directives andselect
operations.Broken changes:
select
argument 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 test
successfully../lint.sh --mode=fix
to fix all linting issues raised by./lint.sh --mode=check
.Checklist:
<type>(<optional scope>): <title>