8000 GitHub - AbduRahmanS/rust-subgraph · GitHub
[go: up one dir, main page]

Skip to content
< 7FFF script type="application/json" data-target="react-partial.embeddedData">{"props":{"color_mode":"dark","logged_in":false,"marketing_page":false,"home_path":"/","login_path":"/login?return_to=https%3A%2F%2FGitHub.com%2FAbduRahmanS%2Frust-subgraph","signup_path":"/signup?ref_cta=Sign+up\u0026ref_loc=header+logged+out\u0026ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E\u0026source=header-repo\u0026source_repo=AbduRahmanS%2Frust-subgraph","signup_enabled":true,"is_signup_controller":false,"show_search_and_nav":true,"hide_search":false,"private_mode_enabled":false,"should_use_dotcom_links":true,"auth_hydro_click":"{\"event_type\":\"authentication.click\",\"payload\":{\"location_in_page\":\"site header menu\",\"repository_id\":null,\"auth_type\":\"SIGN_UP\",\"originating_url\":\"https://GitHub.com/AbduRahmanS/rust-subgraph\",\"user_id\":null}}","auth_hydro_click_hmac":"ef17c66bac6f86ce08aeb622eb3f69380567239b2dba71afe2db6dc7662c080a"}}

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

async-graphql Subgraph Template

Deploy on Railway

This template can be used to quickly create an Apollo Federation subgraph with the async-graphql crate.

What's Included

  • A basic, Apollo Federation subgraph with simple examples for queries, entities, and mutations. You can run this subgraph with cargo run or cargo watch -x run if using cargo-watch for auto-reloading.
  • Example tests in the tests directory. You can run these tests with cargo test.
  • GitHub Actions workflows which will:
    • Run cargo test on every push.
    • Check the schema against Apollo Studio on every push.
    • Publish the subgraph to Apollo Studio on every push to the main branch.

Next Steps

  • Download Rover and start it using the command printed out from cargo run to start a local version of Apollo Explorer.
  • Replace "my-subgraph" in Cargo.toml with the name of your subgraph.
  • Start filling in your own types and resolvers in src/lib.rs.
  • Set these secrets in GitHub Actions:
    • APOLLO_KEY: An Apollo Studio API key for the supergraph to enable schema checks and publishing of the subgraph.
    • APOLLO_GRAPH_REF: The name of the supergraph in Apollo Studio.
    • PRODUCTION_URL: The URL of the deployed subgraph that the supergraph gateway will route to.
  • Remove the if: false lines from .github/workflows/checks.yaml and .github/workflows/deploy.yaml to enable schema checks and publishing.
  • Write your custom deploy logic in .github/workflows/deploy.yaml.
  • Send the Router-Authorization header from your Cloud router and set the ROUTER_SECRET environment variable wherever you deploy this to.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0