schema-snapshot
Skill13 starsChanged 10 days agoMITView on GitHub
How the GraphQL schema is pinned by a snapshot test - schema.graphql in the integration tests, comparing it with /graphql?sdl, and updating it on purpose when the schema changes. Use when the schema snapshot test fails, or after adding or changing a query, mutation, type, field or description.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- zalogarcia/zalo-claude-code-setuptheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- zalogarcia/zalo-claude-code-setup★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-a-use-caseSkill
- api-conventionsSkill
- branches-and-pull-requestsSkill
- cancellationSkill
- ci-for-your-solutionSkill
- ci-pipelineSkill
- clean-architecture-layersSkill
- configuration-and-environmentsSkill
- coverageSkill
- csharp-house-styleSkill
- data-access-ef-coreSkill
- database-migrationsSkill
- dataloadersSkill
- docker-and-composeSkill
- docs-and-voiceSkill
- errors-and-exceptionsSkill
- expose-a-use-caseSkill
- family-syncSkill
- health-checksSkill
- integration-testsSkill
- mapping-with-mapperlySkill
- mediatorSkill
- nitroSkill
- optional-token-authSkill
- packages-and-dependenciesSkill
- pagingSkill
- presentation-integration-testsSkill
- releasesSkill
- sample-dataSkill
- security-findingsSkill
- serilogSkill
- telemetrySkill
- template-authoringSkill
- test-designSkill
- time-providerSkill
- unit-testsSkill
- validationSkill
- writing-a-skillSkill
- xml-docs-and-openapiSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Run the tests. The snapshot test fails and prints the new schema.
- Distinctive: line 21
Read the diff. A removed field, a renamed one, or a field that became non-null breaks clients, so say so in the pull request.
- Distinctive: line 22
Run the tests again.
- Distinctive: line 26
Update the snapshot without reading the diff.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Schema snapshot
The rule
tests/Presentation.Tests.Integration/GraphQL/Schema/schema.graphql is the schema clients see, checked in. SchemaTests.Schema_ShouldMatch_Snapshot asks the running app for /graphql?sdl and fails when the two differ. Every schema change shows up in a pull request as a diff of that file, so reviewers see exactly what clients will see.
The test ignores lines that start with #, which GraphQL treats as comments. In the template repository the snapshot uses them to mark the ApplyPolicy enum, which only exists when authorization is on, so dotnet new can leave it out of a solution created without --include-auth. Keep those markers when you update the snapshot there.
Steps
- Make the schema change.
- Run the tests. The snapshot test fails and prints the new schema.
- Copy the new SDL into
schema.graphql. Either take it from the test output, or run the app and open http://localhost:7330/graphql?sdl. - Read the diff. A removed field, a renamed one, or a field that became non-null breaks clients, so say so in the pull request.
- Run the tests again.
Don't
- Update the snapshot without reading the diff.
- Edit
schema.graphqlby hand to make the test pass. - Skip or delete the snapshot test.
Check
dotnet test tests/Presentation.Tests.Integration --filter "FullyQualifiedName~SchemaTests"
git diff tests/Presentation.Tests.Integration/GraphQL/Schema/schema.graphqlDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

