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

Merged
merged 4 commits into from
Jul 3, 2025

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.

Copy link
Member

@lrlna lrlna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@goto-bus-stop goto-bus-stop enabled auto-merge (squash) July 3, 2025 06:44
@apollo-librarian
Copy link

apollo-librarian bot commented Jul 3, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: e8e812a3289c21d20b1c8e9c

@goto-bus-stop goto-bus-stop merged commit 49215b9 into dev Jul 3, 2025
15 checks passed
@goto-bus-stop goto-bus-stop deleted the renee/meet-the-mockers branch July 3, 2025 07:04
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.

2 participants