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

Support a factory function and promise as a schema input #1497

Merged
merged 2 commits into from
Aug 1, 2022
Merged

Conversation

ardatan
Copy link
Collaborator

@ardatan ardatan commented Jul 28, 2022

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jul 28, 2022

🦋 Changeset detected

Latest commit: 1059438

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

This PR includes changesets to release 36 packages
Name Type
graphql-yoga Minor
@graphql-yoga/common Patch
@graphql-yoga/node Patch
@graphql-yoga/render-graphiql Major
@graphql-yoga/plugin-apq Major
@graphql-yoga/persisted-operations Major
@graphql-yoga/plugin-response-cache Major
apollo-federation-gateway-with-yoga Patch
apollo-subgraph-with-yoga Patch
azure-function Patch
cloudflare-advanced Patch
cloudflare Patch
defer-stream-example Patch
error-masking-example Patch
express-example Patch
fastify-modules-example Patch
fastify-example Patch
file-upload-nextjs-pothos Patch
file-upload-nexus Patch
file-upload Patch
example-generic-auth Patch
graphql-config-example Patch
graphql-ws Patch
hackernews Patch
hello-world Patch
koa-example Patch
example-live-query Patch
nextjs-auth Patch
nextjs Patch
node-esm Patch
example-redis-pub-sub Patch
service-worker Patch
subscriptions-example Patch
sveltekit Patch
hello-world-benchmark Patch
graphql-lambda Patch

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

@github-actions
Copy link
Contributor

The latest changes of this PR are not available as canary, since there are no linked changesets for this PR.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 28, 2022

✅ Benchmark Results

     ✓ no_errors
     ✓ expected_result

     checks.........................: 100.00% ✓ 107898      ✗ 0    
     data_received..................: 14 MB   478 kB/s
     data_sent......................: 6.2 MB  207 kB/s
     http_req_blocked...............: avg=2.18µs   min=1.2µs   med=1.9µs   max=1.38ms  p(90)=2.4µs    p(95)=2.8µs   
     http_req_connecting............: avg=3ns      min=0s      med=0s      max=163.1µs p(90)=0s       p(95)=0s      
   ✓ http_req_duration..............: avg=435.28µs min=255.6µs med=390.1µs max=27.71ms p(90)=493.92µs p(95)=575.06µs
       { expected_response:true }...: avg=435.28µs min=255.6µs med=390.1µs max=27.71ms p(90)=493.92µs p(95)=575.06µs
     http_req_failed................: 0.00%   ✓ 0           ✗ 53949
     http_req_receiving.............: avg=31.66µs  min=16.8µs  med=27.8µs  max=6.45ms  p(90)=38.69µs  p(95)=44.6µs  
     http_req_sending...............: avg=13.65µs  min=6µs     med=9.4µs   max=2.99ms  p(90)=19.4µs   p(95)=21.2µs  
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s      max=0s      p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=389.96µs min=229.2µs med=347.4µs max=27.56ms p(90)=441.5µs  p(95)=515.9µs 
     http_reqs......................: 53949   1798.196266/s
     iteration_duration.............: avg=548.6µs  min=320.5µs med=501.7µs max=28.3ms  p(90)=616.7µs  p(95)=708.66µs
     iterations.....................: 53949   1798.196266/s
     vus............................: 0       min=0         max=1  
     vus_max........................: 1       min=1         max=1  

Copy link
Collaborator

@n1ru4l n1ru4l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this really need to be a plugin? Couldn't the schema property on createYoga accept a function that returns a Promise that resolves to a Schema?

@ardatan ardatan changed the title Lazy Schema Plugin Support a factory function and promise as a schema input Jul 29, 2022
@ardatan ardatan requested review from saihaj and n1ru4l July 29, 2022 12:36
@ardatan
Copy link
Collaborator Author

ardatan commented Jul 29, 2022

How about now?

Copy link
Collaborator

@n1ru4l n1ru4l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yaaaas 🥳

@ardatan ardatan merged commit 1d7f810 into v3 Aug 1, 2022
@ardatan ardatan deleted the lazy-schema branch August 1, 2022 09:33
@ardatan ardatan self-assigned this Aug 2, 2022
@theguild-bot theguild-bot mentioned this pull request Aug 9, 2022
This was referenced Sep 21, 2022
@saihaj saihaj mentioned this pull request Sep 28, 2022
@saihaj saihaj mentioned this pull request Oct 17, 2022
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.

3 participants