Stormware.Mpohoda.OpenApi.Client.GraphQl
20.0.0
dotnet add package Stormware.Mpohoda.OpenApi.Client.GraphQl --version 20.0.0
NuGet\Install-Package Stormware.Mpohoda.OpenApi.Client.GraphQl -Version 20.0.0
<PackageReference Include="Stormware.Mpohoda.OpenApi.Client.GraphQl" Version="20.0.0" />
<PackageVersion Include="Stormware.Mpohoda.OpenApi.Client.GraphQl" Version="20.0.0" />
<PackageReference Include="Stormware.Mpohoda.OpenApi.Client.GraphQl" />
paket add Stormware.Mpohoda.OpenApi.Client.GraphQl --version 20.0.0
#r "nuget: Stormware.Mpohoda.OpenApi.Client.GraphQl, 20.0.0"
#:package Stormware.Mpohoda.OpenApi.Client.GraphQl@20.0.0
#addin nuget:?package=Stormware.Mpohoda.OpenApi.Client.GraphQl&version=20.0.0
#tool nuget:?package=Stormware.Mpohoda.OpenApi.Client.GraphQl&version=20.0.0
mPohoda Open API GraphQL client
Typed Strawberry Shake client for the read-only GraphQL surface shared by the Czech and Slovak mPohoda Open API deployments.
The generated IMphGraphQlClient exposes stable, compile-time checked operations for document search,
MCP reports, validation metadata, and price-list candidate lookup. The MCP facade uses these generated
operations for every query whose shape is known at build time. GraphQlClientProvider is reserved for
the public mpohoda_graphql_query tool, where the caller supplies an arbitrary runtime read query; both
paths reuse the Open API SDK authentication and resilience transport.
var services = new ServiceCollection();
services.AddMphGraphQlClientWithApiKey(
new Uri("https://api.mpohoda.cz/v1/graphql"),
apiKey);
await using var provider = services.BuildServiceProvider();
var client = provider.GetRequiredService<IMphGraphQlClient>();
var result = await client.SearchDocuments.ExecuteAsync(
query: "2026",
documentTypes: "issued_invoice",
issueDateFrom: null,
issueDateTo: null,
businessPartnerName: null,
businessPartnerId: null,
bankAccountId: null,
cashRegisterId: null,
modifiedSince: null,
take: 20,
skip: 0);
AddMphGraphQlClientWithBearerToken and AddMphGraphQlClientWithClientCredentials configure the same SDK OAuth handler. All three registration methods use the shared retry/circuit-breaker policies by default. Pass ClientOptions to change the timeout, inner HTTP handler, or resilience setting.
Multi-caller hosts
The registration helpers above bind one set of credentials to the registration, which suits a consumer
acting as a single API client. A host serving many callers should instead register the generated client
once with AddMphGraphQlClient() and add its own delegating handler that resolves the credentials of the
request in flight (see IPohodaAccountAccessTokenProvider for the shared OAuth token cache). Sharing that
one registration is safe: the client is generated in store-less mode and executes every operation against
the network, so no response data is cached between callers. For runtime-composed queries, hand an
IHttpClientFactory client to new MphGraphQlClient(httpClient) — the base address must already point at
the GraphQL endpoint and the handler chain must apply authentication.
The committed schema.graphql is the minimal operation-generation contract. The full effective server
SDL is published to authenticated callers at /v1/graphql/schema.graphql; the schema contract test
validates every committed generated operation against that effective CZ/SK server schema.
| 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
- Duende.IdentityModel (>= 8.1.0)
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Http.Resilience (>= 10.8.0)
- Microsoft.Extensions.Logging (>= 10.0.10)
- Stormware.Mpohoda.OpenApi.Client.Transport (>= 20.0.0)
- StrawberryShake.Server (>= 16.5.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 20.0.0 | 108 | 10/8/2026 |