Scry.Server
0.1.0-beta.5
dotnet add package Scry.Server --version 0.1.0-beta.5
NuGet\Install-Package Scry.Server -Version 0.1.0-beta.5
<PackageReference Include="Scry.Server" Version="0.1.0-beta.5" />
<PackageVersion Include="Scry.Server" Version="0.1.0-beta.5" />
<PackageReference Include="Scry.Server" />
paket add Scry.Server --version 0.1.0-beta.5
#r "nuget: Scry.Server, 0.1.0-beta.5"
#:package Scry.Server@0.1.0-beta.5
#addin nuget:?package=Scry.Server&version=0.1.0-beta.5&prerelease
#tool nuget:?package=Scry.Server&version=0.1.0-beta.5&prerelease
Scry.Server
Server-side execution for Scry. Validates an incoming query AST against the allow-list, rebinds it to the real EF Core entity types, applies row-level policies, executes against a DbContext, and returns projected rows.
<a id='snippet-serverRegistration'></a>
builder.Services
.AddScry<SampleContext>(
_ =>
{
// Holiday is a [QueryablePoco]: it has no table, so the server supplies its rows. Every
// [QueryablePoco] type must be registered here or AddScry throws at startup.
_.AddPocoSource(_ => Holiday.Seed());
// Department.Handbook and Employee.Photo are [Attachment]s, and one exposed without a
// check is a startup failure. Registered here rather than by [AttachmentWith] because
// the model project references the annotations alone and has no server type to name.
_.AddAttachmentPolicy<Department, HandbookPolicy>();
_.AddAttachmentPolicy<Employee, PhotoPolicy>();
_.MaxPageSize = 200;
// A row policy whose decision is too slow to run per row in SQL, so it runs in C# and
// the server remembers what it answered. Revision is what tells it a row has changed
// and needs deciding again — see /docs/policies.md and the /permissions page.
_.AddCachedPolicy<Order, long, RegionAccessPolicy>(_ => _.Revision);
// Repeat a query while nothing has been written and the answer is a 304 rather than a
// re-execution. Optional, and off until a freshness source says how to tell — see
// /docs/caching.md.
_.UseDeltaFreshness<SampleContext>();
// What a cached response belongs to. This server has sources whose answers depend on
// who asked — the row policy above, and Department.Handbook's attachment check — and
// MapScry refuses to start without this. The sample has no sign-in, so the caller
// half is a constant; a real app returns its tenant or its principal, and a client
// signing in as someone else is then never handed the previous one's rows.
//
// The grants version is the other half, and is the part worth copying. A response
// varies by what the caller is allowed to see, and QueryFreshness only watches the
// database — so a grant changing outside it would move nothing, and a cache holding
// the old rows would go on answering with rows the caller has since lost.
_.CacheScope = _ => $"sample-{_.RequestServices.GetRequiredService<RegionGrants>().Version}";
});
<sup><a href='/samples/Sample.Server/Program.cs#L31-L70' title='Snippet source file'>snippet source</a> | <a href='#snippet-serverRegistration' title='Start of snippet'>anchor</a></sup>
AddPocoSource supplies the rows for a [QueryablePoco] type — see POCO sources.
<a id='snippet-mapScry'></a>
app.MapScry("/api/query");
<sup><a href='/samples/Sample.Server/Program.cs#L85-L87' title='Snippet source file'>snippet source</a> | <a href='#snippet-mapScry' title='Start of snippet'>anchor</a></sup>
Docs: Server · Row policies · Security model
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.EntityFrameworkCore (>= 10.0.11)
- Scry.Annotations (>= 0.1.0-beta.5)
- Scry.Wire (>= 0.1.0-beta.5)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Scry.Server:
| Package | Downloads |
|---|---|
|
Scry.Server.Explorer
An opt-in, browser-Roslyn query explorer (GraphiQL-style) for the Scry server API: write LINQ with IntelliSense, inspect the wire request, and run it. |
|
|
Scry.Server.Delta
Answers a repeated Scry query with 304 Not Modified while nothing has been written, by reading the database's own change marker through Delta. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.5 | 50 | 8/30/2026 |
| 0.1.0-beta.4 | 61 | 8/15/2026 |
| 0.1.0-beta.3 | 65 | 8/2/2026 |
| 0.1.0-beta.2 | 66 | 7/31/2026 |
| 0.1.0-beta.1 | 56 | 7/26/2026 |