GraphQL.PersistedQueries 1.0.2

Persisted Queries for Graphql-Dotnet

Install-Package GraphQL.PersistedQueries -Version 1.0.2
dotnet add package GraphQL.PersistedQueries --version 1.0.2
<PackageReference Include="GraphQL.PersistedQueries" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GraphQL.PersistedQueries --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: GraphQL.PersistedQueries, 1.0.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install GraphQL.PersistedQueries as a Cake Addin
#addin nuget:?package=GraphQL.PersistedQueries&version=1.0.2

// Install GraphQL.PersistedQueries as a Cake Tool
#tool nuget:?package=GraphQL.PersistedQueries&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

graphql-dotnet-persistedqueries

Persisted Queries for Graphql-Dotnet

Usage

Get graphqlmap.json file using relay-compiler

> relay-compiler --src ./src --schema ./schema.graphql --watchman false --persist-output C:\graphqlmap.json

Inject Library

      public void ConfigureServices(IServiceCollection services)
      {            
        container.AddSingleton<CacheQueryMonitor>(sp =>
          new CacheQueryMonitor(sp.GetService<IDistributedCache>(),@"c:\graphqlmap.json"));
      }
      public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
      {
        app.ApplicationServices.GetService<CacheQueryMonitor>();
        app.Use(next => context => {
          context.Request.EnableBuffering();
          return next(context);
        });
        app.UseMiddleware<PersistedGraphQLHttpMiddleware>();
      }

graphql-dotnet-persistedqueries

Persisted Queries for Graphql-Dotnet

Usage

Get graphqlmap.json file using relay-compiler

> relay-compiler --src ./src --schema ./schema.graphql --watchman false --persist-output C:\graphqlmap.json

Inject Library

      public void ConfigureServices(IServiceCollection services)
      {            
        container.AddSingleton<CacheQueryMonitor>(sp =>
          new CacheQueryMonitor(sp.GetService<IDistributedCache>(),@"c:\graphqlmap.json"));
      }
      public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
      {
        app.ApplicationServices.GetService<CacheQueryMonitor>();
        app.Use(next => context => {
          context.Request.EnableBuffering();
          return next(context);
        });
        app.UseMiddleware<PersistedGraphQLHttpMiddleware>();
      }

Release Notes

Some Correction CacheQueryWatcher

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.2 162 8/16/2020
1.0.1 126 8/10/2020
1.0.0 139 8/10/2020