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 rover supergraph fetch for contract variants #1013

Closed
lennyburdette opened this issue Feb 17, 2022 · 7 comments
Closed

Support rover supergraph fetch for contract variants #1013

lennyburdette opened this issue Feb 17, 2022 · 7 comments
Assignees
Labels
feature 🎉 new commands, flags, functionality, and improved error messages triage issues and PRs that need to be triaged

Comments

@lennyburdette
Copy link
Contributor

lennyburdette commented Feb 17, 2022

From a customer:

When using rover supergraph fetch <variant_graph_ref> it fails saying:

error[E007]: The graph `customer@contract-variant` is a non-federated graph. This operation is only possible for federated graphs.
        Try running the command on a valid federated graph, or use the appropriate `rover graph` command instead of `rover subgraph`.

The use case is fetching the supergraph schema to use in an Uplink fallback. They need the contract supergraph with all the @inaccessible directives applied.

@jsegaran and @david-castaneda are working on an API change that should make this possible.

@lennyburdette lennyburdette added feature 🎉 new commands, flags, functionality, and improved error messages triage issues and PRs that need to be triaged labels Feb 17, 2022
@abernix
Copy link
Member

abernix commented Feb 18, 2022

I can confirm that our remote API doesn't yet support contract variants! Once that lands, this will just start working right? With no changes on Rover?

@david-castaneda
Copy link
Contributor

@lennyburdette @abernix The API for fetching the latest approved schema should be ready for use.

This query should work for regular variants and contract variants.

query {
  service(id: "") {
    variant(name: "") {
      latestApprovedLaunch {
        build {
          result {
            ... on BuildSuccess {
              coreSchema {
                apiDocument
                coreDocument
              }
            }
          }
        }
      }
    }
  }
}

@EverlastingBugstopper
Copy link
Contributor

hey @david-castaneda - would love to accept a PR that uses this new query!

@lennyburdette
Copy link
Contributor Author

@david-castaneda will latestApprovedLaunch always be a successful launch?

@jsegaran
Copy link
Contributor

jsegaran commented Mar 3, 2022

Yep. The latest approved launch contains the schema that is being used by uplink for running gateways/routers.

1 similar comment
@jsegaran
Copy link
Contributor

jsegaran commented Mar 3, 2022

Yep. The latest approved launch contains the schema that is being used by uplink for running gateways/routers.

@EverlastingBugstopper
Copy link
Contributor

This works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🎉 new commands, flags, functionality, and improved error messages triage issues and PRs that need to be triaged
Projects
None yet
Development

No branches or pull requests

5 participants