bug: ProjectionRoot client class not generated for Connection query
Expected behavior
With the following schema:
type Query {
something: MovieConnection
}
type Movie @connection {
movieID: ID
title: String
}
and the generateClient option set to true, I was expecting the SomethingProjectionRoot.java class to be generated under the client package.
Actual behavior
Only the SomethingGraphQLQuery.java class is being generated under the client package.
The SomethingProjectionRoot.java class does get generated if I add the MovieConnection type to my schema file:
type MovieConnection {
edges: [MovieEdge]
pageInfo: PageInfo
}
Steps to reproduce
A minimal reproducible example is in https://github.com/RuiLoureiro/dgs-pagination-bug
The @connection directive is processed at run time to generate the
appropriate connection types. Codegeneration is therefore not aware of
these types since it works with static schema. We will need to enhance
codegen to add this functionality. Thanks for reporting!
On Fri, Jan 21, 2022 at 12:25 PM RuiLoureiro @.***> wrote:
Expected behavior
With the following schema:
type Query { something: MovieConnection } type Movie @connection { movieID: ID title: String }
and the generateClient option set to true, I was expecting the SomethingProjectionRoot.java class to be generated under the client package. Actual behavior
Only the SomethingGraphQLQuery.java class is being generated under the client package.
The SomethingProjectionRoot.java class does get generated if I add the MovieConnection type to my schema file:
type MovieConnection { edges: [MovieEdge] pageInfo: PageInfo }
Steps to reproduce
A minimal reproducible example is in https://github.com/RuiLoureiro/dgs-pagination-bug
— Reply to this email directly, view it on GitHub https://github.com/Netflix/dgs-framework/issues/833, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ5JPXLKL24Q2NB3QMTPVQLUXG6KNANCNFSM5MQO455Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>
@srinivasankavitha, Is there any progress on this? According to the documentation, this might have already been implemented. https://netflix.github.io/dgs/advanced/relay-pagination/#configuring-code-generation However, the same class was not generated for me.
if I add the MovieConnection type to my schema file
I found this solution will have problem with @shareable in apollo federation 2.
@srinivasankavitha, Is there any progress on this? According to the documentation, this might have already been implemented. https://netflix.github.io/dgs/advanced/relay-pagination/#configuring-code-generation However, the same class was not generated for me.
If you are looking for the type mapping, could you try out the recommended mapping?
We haven't yet worked through adding explicit support for apollo federation 2, so I do expect a few of our existing features will need to be reworked.