Gremlinq.Extensions 14.0.0
Changes
- Update core package references to v14
- Rename CosmosDb provider projects
- Add Key deserialization support
ExRam.Gremlinq 14 contains a few breaking changes. Most of them have already been communicated by ObsoleteAttribute-markers in recent releases in the 13.x-line.
CosmosDb provider packages have moved to Gremlinq.Extensions
Optimize Step-serialization (#2392)
Instruction, Step[], etc.), leading to unnecessary (failed) lookups. Furthermore, since the order of these target types was fixed, it was impossible to override Step serialization when the target types did not fit (or supersede each other in a specific way).Step is now serialized to the object target type. The resulting instance is then handled based on its actual type.Possibly breaking change for Custom IConverterFactory Implementations: Custom IConverterFactory implementations that previously reacted to specific target types must now recognize requests for the object target type and determine if they can satisfy the conversion. This change ensures compatibility with the new serialization approach while maintaining flexibility for custom converters.
Rename edge-creation query surface from IInOrOutEdgeGremlinQuery to IAddEdgeGremlinQuery (#2357)
The previous naming was confusing, seemingly indicating a base interface type for an edge that is not known to be an in or out edge, when actually, the sole purpose of that interface was to be returned by the AddE-operator to enable fluent calls to To or From.
Remove StringComparisonTranslationStrictness (#2372)
Gremlinq will always behave as if StringComparisonTranslationStrictness.Strict was configured. Queries using a string comparison which is not supported on a specific database provider (e.g. case insensitive queries on Azure CosmosDb) must be modified accordingly. StringComparisonTranslationStrictness was already marked obsolete in later 13.x versions.
Rename extension classes (#2358)
Classes named ConfigurableGremlinQuerySourceExtensions are renamed to GremlinQuerySourceExtensions.
Drop .NET 6, 7 (#2360, #2361) These target frameworks are no longer supported by Microsoft.
Add support for ElementMap operator (#2385, #2386, #2393)
Add Key deserialization support (#2384)
Implement IEquatable on Key because it's there already. (#2387)
The UseCosmosDb(...)-extensions in ExRam.Gremlinq.Providers.CosmosDb and ExRam.Gremlinq.Providers.CosmosDb.AspNet are marked obsolete in this release. They, along with the projects/packages, will be removed entirely in v14.
The packages are continuing their life on the Gremlinq.Extensions paid private NuGet feed, available from version 13.9.0 onwards under the same package names - so upgrading is a one-line change to your package references with no API changes required.
To silence the obsolescence warning and prepare for v14, either stay on a version <= 13.8.1, or subscribe to any Gremlinq.Extensions offer, configure the private feed with your license key, and update your package references to 13.9.0 or later.
Full transition details: https://docs.gremlinq.net/cosmosdb-provider-packages/
Starting with the 13.9.0 release of Gremlinq.Extensions, the ExRam.Gremlinq.Providers.CosmosDb and ExRam.Gremlinq.Providers.CosmosDb.AspNet packages are now also being distributed through the Gremlinq.Extensions NuGet feed, mirroring their OSS counterparts in ExRam.Gremlinq, which are going to be marked obsolete. All subscribers to any Gremlinq.Extensions package will automatically gain access to these packages on the same feed at no additional cost. Note that starting with Gremlinq.Extensions v14, these packages will be renamed to Gremlinq.Extensions.Providers.CosmosDb and Gremlinq.Extensions.Providers.CosmosDb.AspNet respectively - consumers should plan to update their package references accordingly when upgrading to v14.
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.