You can use in two ways.
-
Directly as the pre-commit hook in your .git/hooks folder.
-
With Husky by updating your package.json with:
"husky": {
You can use in two ways.
Directly as the pre-commit hook in your .git/hooks folder.
With Husky by updating your package.json with:
"husky": {
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using HotChocolate.Configuration; | |
using HotChocolate.Types.Descriptors; | |
using HotChocolate.Types.Descriptors.Definitions; | |
namespace HotChocolate.Types.Relay | |
{ | |
/// <summary> |
Wrappers to ensure distributed session loading is done asynchronously as per advice in MS docs.
Note: It looks like currently it's kind of pointless to try and optimize LoadAsync
to only occur where needed (as in my middleware below checking for at least the cookie, or as per suggestions in closed issues to have an attribute that could be sprinkled on controllers/actions) as the standard session middleware always runs CommitAsync
(see here), which in turn checks ISession.IsAvailable
, which calls Load
and ends up doing a sync load... So as far as I can tell, as soon as you've got UseSession()
in your pipeline, bar shortcircuited handling for things like static files, you're going to have this CommitAsync
run, regardless of what your app code is doing (setting or getting values from Session). Still testing if there's something else that avoids the unnecessary load though.
Usage:
// Services setup
services.Configure<OurDistributedSessionSettings>(
Config.GetSection("OurDistributedSes
using System; | |
using System.Collections.Generic; | |
using HotChocolate; | |
using HotChocolate.Execution; | |
using HotChocolate.Execution.Instrumentation; | |
using HotChocolate.Resolvers; | |
using Microsoft.Extensions.Logging; | |
namespace MyCompany.GraphQL.Execution.Instrumentation | |
{ |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using HotChocolate.Language; | |
using HotChocolate.Stitching.Merge; | |
using HotChocolate.Stitching.Merge.Rewriters; | |
using HotChocolate.Types; | |
namespace MyCompany.GraphQLService.Stitching | |
{ |
using System; | |
using System.Collections.Generic; | |
using System.Collections.Immutable; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using HotChocolate; | |
using HotChocolate.Execution; | |
using HotChocolate.Language; | |
using HotChocolate.Resolvers; | |
using HotChocolate.Stitching; |
Coffee
Brunch
Vin
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using AutoGuru.Client.Shared; | |
using AutoGuru.Client.Shared.Dtos; | |
using AutoGuru.Client.Shared.Models; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.Logging; |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using HotChocolate.Stitching.Merge; | |
namespace MyCompany.GatewayService.Stitching | |
{ | |
/// <summary> | |
/// <para>This merge handler deals with duplicate directives when schemas are stitched.</para> | |
/// <para>It currently handles dupes of: authorize.</para> |