Gremlinq.Extensions 13.8.0
Changes
- Add documentation. (#168) @danielcweber
- Check nullability without the help of NullGuard.Fody (#167) @danielcweber
AWSCredentials from the AWS SDK (#2302)This release adds first-class integration with the AWS SDK's AWSCredentials identity resolution infrastructure for the Neptune provider. Previously, IAM authentication required manually providing AccessKeyId and SecretAccessKey strings. Now you can leverage the AWS SDK's credential chain (IIdentityResolver<AWSCredentials>, DefaultAWSCredentialsIdentityResolver, or any AWSCredentials instance) to resolve credentials automatically.
The changes span two layers: the low-level signer extensions (Providers.Neptune) and the ASP.NET Core DI extensions (Providers.Neptune.AspNet).
WithCredentials — Configure signer from an AWSCredentials objectResolves credentials synchronously from any AWS SDK AWSCredentials instance (e.g., BasicAWSCredentials, SessionAWSCredentials, AssumeRoleAWSCredentials).
```csharp name=WithCredentials.cs using Amazon.Runtime; using ExRam.Gremlinq.Providers.Neptune;
var signer = AWSSigner.EmptySigV4 .WithUri(new Uri("wss://my-neptune-cluster.us-east-1.neptune.amazonaws.com:8182")) .WithRegion("us-east-1") .WithCredentials(new BasicAWSCredentials("AKID", "SecretKey"));
#### 2. `WithCredentialsFrom` — Configure signer from an `IIdentityResolver<AWSCredentials>`
Resolves credentials from any custom or built-in `IIdentityResolver<AWSCredentials>`, with an optional `IClientConfig`.
```csharp name=WithCredentialsFrom.cs
using Amazon.Runtime;
using Amazon.Runtime.Identity;
using ExRam.Gremlinq.Providers.Neptune;
IIdentityResolver<AWSCredentials> myResolver = /* your custom resolver */;
var signer = AWSSigner.EmptySigV4
.WithUri(new Uri("wss://my-neptune-cluster.us-east-1.neptune.amazonaws.com:8182"))
.WithRegion("us-east-1")
.WithCredentialsFrom(myResolver);
WithCredentialsFromDefaultAWSCredentialsIdentityResolver — Use the AWS default credential chainUses DefaultAWSCredentialsIdentityResolver which walks the standard AWS credential chain (environment variables, AWS profiles, IMDS, ECS task roles, etc.).
```csharp name=WithCredentialsFromDefaultResolver.cs using ExRam.Gremlinq.Providers.Neptune;
var signer = AWSSigner.EmptySigV4 .WithUri(new Uri("wss://my-neptune-cluster.us-east-1.neptune.amazonaws.com:8182")) .WithRegion("us-east-1") .WithCredentialsFromDefaultAWSCredentialsIdentityResolver();
#### 4. `UseAWSCredentialsIdentityResolver` (ASP.NET Core DI) — Register a custom identity resolver
Registers a specific `IIdentityResolver<AWSCredentials>` as a singleton in the DI container. When `UseIAMAuthentication` is called, it will prefer this resolver over config-based `AccessKeyId`/`SecretAccessKey`.
```csharp name=UseAWSCredentialsIdentityResolver.cs
using Amazon.Runtime;
using Amazon.Runtime.Identity;
using ExRam.Gremlinq.Providers.Neptune.AspNet;
// In Startup / Program.cs
builder.Services
.AddGremlinq(setup => setup
.UseNeptune<Vertex, Edge>()
.UseAWSCredentialsIdentityResolver(myCustomResolver)
.UseIAMAuthentication());
UseDefaultAWSCredentialsIdentityResolver (ASP.NET Core DI) — Register the default AWS credential chainConvenience shorthand that registers DefaultAWSCredentialsIdentityResolver into DI.
```csharp name=UseDefaultAWSCredentialsIdentityResolver.cs using ExRam.Gremlinq.Providers.Neptune.AspNet;
builder.Services
.AddGremlinq(setup => setup
.UseNeptune#### 6. `UseIAMAuthentication(IClientConfig)` (ASP.NET Core DI) — IAM auth with client config
A new overload of `UseIAMAuthentication` that accepts an `IClientConfig`, passed through to the identity resolver when resolving credentials.
```csharp name=UseIAMAuthenticationWithClientConfig.cs
using Amazon.Runtime;
using ExRam.Gremlinq.Providers.Neptune.AspNet;
var clientConfig = new AmazonNeptunedataConfig { RegionEndpoint = RegionEndpoint.USEast1 };
builder.Services
.AddGremlinq(setup => setup
.UseNeptune<Vertex, Edge>()
.UseDefaultAWSCredentialsIdentityResolver()
.UseIAMAuthentication(clientConfig));
The 13.7.1 release focuses on documentation improvements and code quality enhancements through static analysis.
OfType OperatorOfType operator now throws early when detecting contradictory type constraints that would result in empty query results (#2274). This helps catch logic errors at query-build time rather than silently producing empty results.OfType overloads: Additional overloads have been added to the OfType operator (#2273) for improved flexibility and type safety.IEdgeGremlinQuery interface has been introduced for representing an edge with a known adjacent vertex type but not known to be an in- or out-edge (#2267)BothE overloads: Following the pattern established in version 13.6.0 and now possible thanks to #2267, BothE supports multiple type parameters (#2270), eliminating the need for Union calls when traversing multiple edge types.In/Out/Both/InE/OutE/BothE overloads with multiple type parametersExRam.Gremlinq now supports passing multiple type parameters to In, Out, Both, InE, OutE and BothE traversal steps, removing the need to use Union over multiple single .In/InE/Out/OutE/Both/BothE calls. (#2256, #2259, #2260, #2261)
[!IMPORTANT] Possible compilation errors: If you have created equally-named extension methods for
In,OutorBoth(orInE/OutE/BothE) that accept 2 generic type parameters - possibly as a shortcut for chaining e.g..In<…>().OfType<…>()- you may encounter compilation errors after upgrading, because the new built-in overloads will now be preffered over your extensions. In this case, please rename your custom extensions (e.g. toInOfType,OutOfType,BothOfType,InEOfType,OutEOfType,BothEOfTypeetc.) to resolve the ambiguity. Same goes for any other reasons your code might have extensions with any number of generic parameters that will conflict with the new overloads. Check before updating.
Gremlinq will now detect empty label sets that arise from unsatisfiable type constraints that would result in unsatisfiable label-sets at query-build time (that is still at runtime) and throw an informative exception. Previously, such queries would silently produce empty results, masking what is almost always a bug in the query or the type model. If you see a new exception after upgrading, it means the query in question was already broken before - it is now being called out explicitly so it can be fixed.
This release introduces first-class support for date and time operations in Gremlin queries, along with improvements to the WebSocket client.
Gremlinq now provides dedicated query types and APIs for working with dates:
Additionally, convenience extension methods are now available for , making date-based queries more ergonomic.
The WebSocket client implementation has been reviewed and cleaned up for improved reliability.