Skip to content

Subscription event DataFetcherResult.extensions are missing from emitted ExecutionResult #4475

Open

Description

@jjacobs44

When a subscription publisher emits a DataFetcherResult containing extensions, those extensions are not included in the emitted ExecutionResult.

Reproduction

A subscription data fetcher returns:

return Mono.just(
    DataFetcherResult.newResult()
        .data(event)
        .extensions(Map.of("myKey", "myValue"))
        .build()
);

The emitted result contains the expected data, but:

executionResult.getExtensions() == null

Adding the value directly to the ExtensionsBuilder during the initial data-fetcher invocation causes it to appear on the initial subscription result:

 dfe.getGraphQlContext()
     .get(ExtensionsBuilder.class)
     .addValue("myKey", "myValue");

However, extensions supplied by an emitted DataFetcherResult are missing from the corresponding subscription event result.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions