Skip to content

Schema inspection reports skipped type when field is mapped to property with generic type #1037

Closed
@luis22737928

Description

@luis22737928

Hello, I have come across the following issue... I have a controller that returns a typed class (DataRep) and in this class there is a collection of T.

Here is the schema definition:

type Genero {
    id: Int
    descripcion: String
}

type PagGenero {
    listado: [Genero]
}

Here is the controller:

@QueryMapping
public DataResp<Genero> getGenerosPag(@Argument(name = "dataReq") _GeneroDataReqInput dataReq) {
        return generoService.findByUsuarioActual(dataReq);
}

And here is the class returned DataResp:

public class DataResp<T> {
    protected List<T> listado = new ArrayList<>();

    public DataResp(List<T> listado) {
        this.listado = listado;
    }
}

Everything works fine, but the inspection report cannot recognize the type of the collection and reports Genero as a skipped type:

GraphQL schema inspection:
	Unmapped fields: {}
	Unmapped registrations: {}
	Unmapped arguments: {}
	Skipped types: [Genero]

Is there a way to make introspection recognize this mapping between the collection declared in the schema and the one returned? thank you in advance

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions