Skip to content

Use new subgraph mocking functionality for canned test supergraph #7711

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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

goto-bus-stop
Copy link
Member

Many of our tests use a simple "canned" default schema. This PR replaces the hardcoded query/response mocks with the new subgraph mocking functionality that uses a GraphQL execution engine for that schema.

This is more future-proof in case query plans change in benign ways.

Additionally:

  • axum_factory::tests::defer_is_not_buffered was using a query that didn't have existing mocks, but now it works
  • Some studio metrics tests were using a query that didn't have existing mocks, so they were always reporting has_errors: true, now it works

These used to have errors because the subgraph mocks did not support the
test query:

```
couldn't find mock for query {"query":"{ topProducts { name } }"}
```

Now the mocks use an execution engine so it returns a valid response.
@goto-bus-stop goto-bus-stop requested a review from a team as a code owner June 17, 2025 10:50
Copy link
Contributor

@goto-bus-stop, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.

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.

1 participant