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

feat: allow accessing request within persisted operation id extraction #3183

Merged
merged 4 commits into from
Feb 23, 2024

Conversation

n1ru4l
Copy link
Collaborator

@n1ru4l n1ru4l commented Feb 6, 2024

I was checking whether I could also access the already parsed URL within onParse, but it seems to not be available.

Closes #3177

Copy link

changeset-bot bot commented Feb 6, 2024

🦋 Changeset detected

Latest commit: 444ba97

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphql-yoga/plugin-persisted-operations Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Feb 6, 2024

Apollo Federation Subgraph Compatibility Results

Federation 1 Support Federation 2 Support
_service🟢
@key (single)🟢
@key (multi)🟢
@key (composite)🟢
repeatable @key🟢
@requires🟢
@provides🟢
federated tracing🟢
@link🟢
@shareable🟢
@tag🟢
@override🟢
@inaccessible🟢
@composeDirective🟢
@interfaceObject🟢

Learn more:

Copy link
Contributor

github-actions bot commented Feb 6, 2024

✅ Benchmark Results

     ✓ no_errors{mode:graphql}
     ✓ expected_result{mode:graphql}
     ✓ no_errors{mode:graphql-jit}
     ✓ expected_result{mode:graphql-jit}
     ✓ no_errors{mode:graphql-response-cache}
     ✓ expected_result{mode:graphql-response-cache}
     ✓ no_errors{mode:graphql-no-parse-validate-cache}
     ✓ expected_result{mode:graphql-no-parse-validate-cache}

     checks.......................................: 100.00% ✓ 404308      ✗ 0     
     data_received................................: 1.7 GB  14 MB/s
     data_sent....................................: 82 MB   680 kB/s
     http_req_blocked.............................: avg=1.46µs   min=992ns    med=1.31µs   max=272.98µs p(90)=1.92µs   p(95)=2.11µs  
     http_req_connecting..........................: avg=2ns      min=0s       med=0s       max=140.23µs p(90)=0s       p(95)=0s      
     http_req_duration............................: avg=382.22µs min=217.29µs med=337.64µs max=18.07ms  p(90)=537.75µs p(95)=556.19µs
       { expected_response:true }.................: avg=382.22µs min=217.29µs med=337.64µs max=18.07ms  p(90)=537.75µs p(95)=556.19µs
     ✓ { mode:graphql-jit }.......................: avg=285.97µs min=217.29µs med=264.39µs max=18.07ms  p(90)=293.22µs p(95)=304.53µs
     ✓ { mode:graphql-no-parse-validate-cache }...: avg=567.75µs min=476.84µs med=537.36µs max=9.39ms   p(90)=576.02µs p(95)=611.45µs
     ✓ { mode:graphql-response-cache }............: avg=361.59µs min=285.1µs  med=341.8µs  max=9.08ms   p(90)=371.13µs p(95)=381.58µs
     ✓ { mode:graphql }...........................: avg=378.5µs  min=293.74µs med=344.12µs max=12.86ms  p(90)=387.65µs p(95)=439.62µs
     http_req_failed..............................: 0.00%   ✓ 0           ✗ 202154
     http_req_receiving...........................: avg=32.62µs  min=16.57µs  med=32.59µs  max=2.26ms   p(90)=38.18µs  p(95)=40.28µs 
     http_req_sending.............................: avg=8.32µs   min=5.96µs   med=7.38µs   max=4.95ms   p(90)=10.78µs  p(95)=11.53µs 
     http_req_tls_handshaking.....................: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting.............................: avg=341.27µs min=184.18µs med=297.33µs max=17.96ms  p(90)=496.9µs  p(95)=513.19µs
     http_reqs....................................: 202154  1684.590412/s
     iteration_duration...........................: avg=588.8µs  min=379.09µs med=540.44µs max=18.54ms  p(90)=747.56µs p(95)=768.65µs
     iterations...................................: 202154  1684.590412/s
     vus..........................................: 1       min=1         max=1   
     vus_max......................................: 2       min=2         max=2   

Copy link
Contributor

github-actions bot commented Feb 6, 2024

💻 Website Preview

The latest changes are available as preview in: https://be7e9689.graphql-yoga.pages.dev

Copy link
Contributor

github-actions bot commented Feb 6, 2024

🚀 Snapshot Release (rc)

The latest changes of this PR are available as rc on npm (based on the declared changesets):

Package Version Info
@graphql-yoga/plugin-persisted-operations 3.2.0-rc-20240207155018-444ba976 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-response-cache 3.3.0-rc-20240207155018-444ba976 npm ↗︎ unpkg ↗︎

@n1ru4l n1ru4l merged commit 6725f8e into main Feb 23, 2024
28 of 29 checks passed
@n1ru4l n1ru4l deleted the feat-response-cache-request-access branch February 23, 2024 09:52
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.

allow reading persisted document operation id from request (headers)
3 participants