Skip to content

Support Spring Data projections as @SchemaMapping method return values #657

@rstoyanchev

Description

@rstoyanchev
Contributor

QueruydslDataFetcher and QueryByExampleDataFetcher already support use of projection interfaces to customize return values. The same is useful in controller methods too to allow loose coupling between schema types and domain entities, see for example discussion in #636.

An @ProjectAs annotation on the controller method could be used to specify the projection interface type to apply to the return value.

Activity

added this to the 1.2.0-RC1 milestone on Mar 30, 2023
self-assigned this
on Mar 30, 2023
modified the milestones: 1.2.0-RC1, 1.2 Backlog, 1.x Backlog on Apr 14, 2023
modified the milestones: 1.x Backlog, 1.3 Backlog on May 15, 2023
removed their assignment
on Mar 8, 2024
modified the milestones: 1.3 Backlog, 1.x Backlog on Apr 18, 2024
modified the milestones: 2.x, 1.4.0-RC1 on Mar 27, 2025
modified the milestones: 1.4.0-RC1, 1.4.0 on Apr 15, 2025
modified the milestones: 1.4.0, 2.0.x on May 16, 2025
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

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bclozel@rstoyanchev

        Issue actions

          Support Spring Data projections as `@SchemaMapping` method return values · Issue #657 · spring-projects/spring-graphql