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

Document endpoint customization #2730

Merged

Conversation

EmrysMyrddin
Copy link
Collaborator

fixes #1901

@changeset-bot
Copy link

changeset-bot bot commented Apr 28, 2023

⚠️ No Changeset found

Latest commit: 3701dcf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@EmrysMyrddin EmrysMyrddin force-pushed the fix/1901-express-custom-endpoint branch from 283e7ab to 39714eb Compare April 28, 2023 08:18
@EmrysMyrddin EmrysMyrddin changed the title Fix custom endpoint with express Document endpoint customization Apr 28, 2023
@EmrysMyrddin EmrysMyrddin force-pushed the fix/1901-express-custom-endpoint branch from 1992460 to e31103a Compare April 28, 2023 08:40
@EmrysMyrddin EmrysMyrddin force-pushed the fix/1901-express-custom-endpoint branch from fe7886e to 504e896 Compare April 28, 2023 09:09
@EmrysMyrddin EmrysMyrddin force-pushed the fix/1901-express-custom-endpoint branch from 504e896 to 78b5121 Compare April 28, 2023 09:11
@EmrysMyrddin
Copy link
Collaborator Author

I think I have updated all relevant examples and documentation.
With this changes, I'm not sure it's necessary to add an explication about how to customize the endpoint. It should be pretty straightforward to find the option in createYoga auto-complete.

@EmrysMyrddin EmrysMyrddin marked this pull request as ready for review April 28, 2023 09:44
@EmrysMyrddin
Copy link
Collaborator Author

I have removed the trailing /.

To note : lot of examples are broken and can't be started after a fresh pnpm install.

@ardatan
Copy link
Collaborator

ardatan commented Apr 28, 2023

Did you follow this before running the examples?
Packages need to be built with pnpm build after pnpm install
https://github.com/dotansimha/graphql-yoga#contributing

@EmrysMyrddin
Copy link
Collaborator Author

Yes, lets discuss about it in an issue : #2731

@ardatan
Copy link
Collaborator

ardatan commented Apr 28, 2023

Could you run pnpm prettier on the root to fix formatting issues? Then we can merge it.

@ardatan ardatan merged commit af1948f into dotansimha:main May 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2023

✅ 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% ✓ 302268      ✗ 0     
     data_received................................: 1.2 GB  10 MB/s
     data_sent....................................: 61 MB   508 kB/s
     http_req_blocked.............................: avg=1.72µs   min=1µs      med=1.4µs    max=870.01µs p(90)=2.2µs    p(95)=2.6µs   
     http_req_connecting..........................: avg=6ns      min=0s       med=0s       max=612.91µs p(90)=0s       p(95)=0s      
     http_req_duration............................: avg=533.4µs  min=289.5µs  med=434.7µs  max=28.03ms  p(90)=769.41µs p(95)=801.01µs
       { expected_response:true }.................: avg=533.4µs  min=289.5µs  med=434.7µs  max=28.03ms  p(90)=769.41µs p(95)=801.01µs
     ✓ { mode:graphql-jit }.......................: avg=405.46µs min=289.5µs  med=359.4µs  max=15.69ms  p(90)=423.8µs  p(95)=459.23µs
     ✓ { mode:graphql-no-parse-validate-cache }...: avg=833.92µs min=685.51µs med=766.01µs max=23.03ms  p(90)=828.68µs p(95)=915.76µs
     ✓ { mode:graphql-response-cache }............: avg=455.96µs min=335.9µs  med=414.6µs  max=18.26ms  p(90)=463.9µs  p(95)=486.31µs
     ✓ { mode:graphql }...........................: avg=554.27µs min=415.3µs  med=479.1µs  max=28.03ms  p(90)=568.86µs p(95)=669.48µs
     http_req_failed..............................: 0.00%   ✓ 0           ✗ 151134
     http_req_receiving...........................: avg=31.48µs  min=17µs     med=27.4µs   max=9.99ms   p(90)=39.3µs   p(95)=44.2µs  
     http_req_sending.............................: avg=14.33µs  min=6.3µs    med=8.5µs    max=11.49ms  p(90)=13.89µs  p(95)=15.9µs  
     http_req_tls_handshaking.....................: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting.............................: avg=487.58µs min=260.7µs  med=393.5µs  max=27.94ms  p(90)=730.51µs p(95)=754.91µs
     http_reqs....................................: 151134  1259.418529/s
     iteration_duration...........................: avg=787.97µs min=501.41µs med=685.21µs max=28.35ms  p(90)=1.01ms   p(95)=1.06ms  
     iterations...................................: 151134  1259.418529/s
     vus..........................................: 1       min=1         max=2   
     vus_max......................................: 2       min=2         max=2   

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.

[v3] express.use() on custom path does not work without setting graphqlEndpoint
2 participants