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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Stormware.Mpohoda.OpenApi.Client.GraphQl" Version="20.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Stormware.Mpohoda.OpenApi.Client.GraphQl" Version="20.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Stormware.Mpohoda.OpenApi.Client.GraphQl" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Stormware.Mpohoda.OpenApi.Client.GraphQl --version 20.0.0
                    
#r "nuget: Stormware.Mpohoda.OpenApi.Client.GraphQl, 20.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Stormware.Mpohoda.OpenApi.Client.GraphQl@20.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Stormware.Mpohoda.OpenApi.Client.GraphQl&version=20.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Stormware.Mpohoda.OpenApi.Client.GraphQl&version=20.0.0
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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