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

[managed-federation] add new plugin to integrate Apollo GraphOS supergraph #3305

Merged
merged 13 commits into from
Jun 12, 2024

Conversation

EmrysMyrddin
Copy link
Collaborator

New plugin to automatically fetch the Apollo Managed Federation supergraph from GraphOS.

This includes:

  • Automatic fetching of the supergraph SDL
  • Automatic stitching to create an executable schema
  • Automatic updates via polling
  • Automatic retry on errors

fixes #3304

Copy link

changeset-bot bot commented May 31, 2024

⚠️ No Changeset found

Latest commit: e682a33

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

Copy link
Contributor

github-actions bot commented May 31, 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 May 31, 2024

💻 Website Preview

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

Copy link
Contributor

github-actions bot commented May 31, 2024

🚀 Snapshot Release (alpha)

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

Package Version Info
@graphql-yoga/apollo-link 3.4.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/urql-exchange 3.4.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/redis-event-target 3.0.1-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/graphiql 4.3.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
graphql-yoga 5.4.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/nestjs 3.4.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/nestjs-federation 3.4.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-apollo-inline-trace 3.4.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/apollo-managed-federation 0.1.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-apq 3.4.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-csrf-prevention 3.4.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-defer-stream 3.4.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-disable-introspection 2.4.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-graphql-sse 3.4.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-jwt 2.4.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-persisted-operations 3.4.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-prometheus 5.1.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-response-cache 3.6.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-sofa 3.4.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/render-graphiql 5.4.0-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎
@graphql-yoga/subscription 5.0.1-alpha-20240612095859-e682a338 npm ↗︎ unpkg ↗︎

Copy link
Contributor

github-actions bot commented May 31, 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% ✓ 414474      ✗ 0     
     data_received................................: 1.7 GB  14 MB/s
     data_sent....................................: 84 MB   698 kB/s
     http_req_blocked.............................: avg=1.46µs   min=1.02µs   med=1.32µs   max=281.95µs p(90)=1.92µs   p(95)=2.11µs  
     http_req_connecting..........................: avg=2ns      min=0s       med=0s       max=160.62µs p(90)=0s       p(95)=0s      
     http_req_duration............................: avg=364.75µs min=221.12µs med=328.6µs  max=24.27ms  p(90)=469.73µs p(95)=489.7µs 
       { expected_response:true }.................: avg=364.75µs min=221.12µs med=328.6µs  max=24.27ms  p(90)=469.73µs p(95)=489.7µs 
     ✓ { mode:graphql-jit }.......................: avg=286.24µs min=221.12µs med=265.96µs max=15.06ms  p(90)=294.71µs p(95)=305.64µs
     ✓ { mode:graphql-no-parse-validate-cache }...: avg=492.09µs min=404.86µs med=465.98µs max=11.8ms   p(90)=508.95µs p(95)=543.48µs
     ✓ { mode:graphql-response-cache }............: avg=347.06µs min=273.37µs med=328.2µs  max=8.47ms   p(90)=357.71µs p(95)=367.96µs
     ✓ { mode:graphql }...........................: avg=370.71µs min=278.66µs med=337.97µs max=24.27ms  p(90)=382.48µs p(95)=414.55µs
     http_req_failed..............................: 0.00%   ✓ 0           ✗ 207237
     http_req_receiving...........................: avg=33.7µs   min=17.43µs  med=33.62µs  max=842.99µs p(90)=39.01µs  p(95)=41.06µs 
     http_req_sending.............................: avg=8.33µs   min=6.06µs   med=7.35µs   max=1.81ms   p(90)=10.9µs   p(95)=11.64µs 
     http_req_tls_handshaking.....................: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting.............................: avg=322.71µs min=185.77µs med=286.99µs max=24.12ms  p(90)=427.05µs p(95)=445.07µs
     http_reqs....................................: 207237  1726.955569/s
     iteration_duration...........................: avg=574.18µs min=394.28µs med=534.4µs  max=24.95ms  p(90)=683.47µs p(95)=708.31µs
     iterations...................................: 207237  1726.955569/s
     vus..........................................: 1       min=1         max=1   
     vus_max......................................: 2       min=2         max=2   

EmrysMyrddin and others added 2 commits June 4, 2024 15:04
Co-authored-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
Co-authored-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
@EmrysMyrddin EmrysMyrddin requested review from n1ru4l and ardatan June 4, 2024 13:35
Co-authored-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
@EmrysMyrddin EmrysMyrddin merged commit 81743c4 into main Jun 12, 2024
35 checks passed
@EmrysMyrddin EmrysMyrddin deleted the managed-federation-plugin branch June 12, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants