Skip to content

Support renaming fields without defining resolver or more than necessary complexity  #636

@nort3x

Description

@nort3x

suppose that i have this setup:

class Entity{
     ...
    Something prefixedSomething;
}

@Controller
class GraphController{

    @QueryMapping
    Entity getEntity(){
        return entity;
    }
}
type Query{
    getEntity: Entity!
}

type Entity{
   ...
   something: Something! # attention here , this is not prefixedSomething
}
type Something{...}

i couldn't find a way to resolve Entity.prefixedSomething as Entity.something beside explicitly adding another method
with @SchemaMapping(type="Entity", field="something")

which i think should be reserved for something more complicated than just a simple name override,
i couldn't find anything in docs, i'm looking for more compact way (possibly annotation based)

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions