dgs-framework
dgs-framework copied to clipboard
bug: Generated client should deserialize PageInfo as DefaultPageInfo out-of-the-box
Consider this schema
type PageInfo {
startCursor: String
endCursor: String
hasNextPage: Boolean!
hasPreviousPage: Boolean!
}
type Entity {
id: ID!
name: String!
}
type EntitiesResult {
entities: [Entity!]!
pageInfo: PageInfo
}
type Query {
getEntities(): EntitiesResult!
}
Expected behavior
When you use the generated client (generateClient=true
) and the client deserializes the result then EntitiesResult should contain PageInfo data
Actual behavior
Deserialization throws exception
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `graphql.relay.PageInfo` (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
@chatoooo - Thanks for reporting. This issue actually belongs in dgs-codegen. Would you be able to report a bug in this repo: https://github.com/Netflix/dgs-codegen/issues ?