Skip to content

How to deal with directive #9

Description

@mores
2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive.
2026-04, the idempotency key is required and must be provided using the `@idempotent` directive.

A discussion has been started to figure out how best to deal with this new requirement: Netflix/dgs-framework#2295

A pull request has been added to upstream provider: Netflix/dgs-codegen#935

A work around has been provided until the above merge is completed:

<dependency>
   <groupId>io.github.mores</groupId>
   <artifactId>java-shopify-graphql-support</artifactId>
   <version>${parent.version}</version>
</dependency>


//import com.netflix.graphql.dgs.client.codegen.GraphQLQueryRequest;
//import com.netflix.graphql.dgs.client.codegen.GraphQLDirective;

import io.github.mores.GraphQLQueryRequest;
import io.github.mores.GraphQLDirective;

java.util.List<GraphQLDirective> directives = java.util.List.of(new GraphQLDirective("idempotent", java.util.Map.of("key", java.util.UUID.randomUUID().toString())));
GraphQLQueryRequest request = new GraphQLQueryRequest(query, root, null, directives);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions