Client generator does not generate projections for "recursive" schemas? #1416
Replies: 3 comments 4 replies
-
With the current implementation of code generation, it will stop once it
detects a cycle and we don't have a configuration option to work around it.
The maxProjectionDepth is applicable when there are no cycles.
We are in the process of reworking the API and the implementation to fix a
bunch of issues with the current implementation. We will likely release
something end of this month. IN the meantime, I would recommend just using
query strings if this is a blocking issue for you.
…On Mon, Feb 13, 2023 at 1:17 AM Petteri Torkko ***@***.***> wrote:
Given the partial schema of
type Hierarchy {
code: String!
children(...): HierarchyConnection
}
type HierarchyConnection {
edges: [HierarchyEdge]
pageInfo: PageInfo
}
type HierarchyEdge {
node: Hierarchy
cursor: String
}
...
version 5.6.9 of the com.netflix.dgs.codegen gradle plugin seems to only
generate projection of
HierarchyProjectionRoot()
.code()
.children()
.edges()
.node()
.code()
.children() // this is omitted
Regardless of the maxProjectionDepth property of the generateJava task,
it seems the recursion always stops at the first loop reference in the
schema.
Is there any way around this?
—
Reply to this email directly, view it on GitHub
<#1416>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJ5JPXLFF2NIUKCTFZD5MHTWXH3ZVANCNFSM6AAAAAAU2ACLFQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
ptorkko
-
Yes, today or tomorrow latest. This will be released as an experimental
feature since it has a slightly new API
…On Wed, Mar 1, 2023 at 9:13 AM Jaime Moncayo ***@***.***> wrote:
@srinivasankavitha <https://github.com/srinivasankavitha> hello - are we
still planning to have a fix for this out today?
—
Reply to this email directly, view it on GitHub
<#1416 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJ5JPXP54A2KCPZ3U7XKFOLWZ57SRANCNFSM6AAAAAAU2ACLFQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
The release is out:
https://github.com/Netflix/dgs-codegen/releases/tag/v5.7.0
You will need a new config `generateClientv2` to use the newer
implementation. Also note that the API has changed very slightly, but it is
also experimental, so we may change it to make improvements in the future.
…On Wed, Mar 1, 2023 at 9:18 AM Jaime Moncayo ***@***.***> wrote:
thanks for the quick response
—
Reply to this email directly, view it on GitHub
<#1416 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJ5JPXOCKNABMMOLDGHIMTTWZ6AGJANCNFSM6AAAAAAU2ACLFQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Given the partial schema of
version
5.6.9
of thecom.netflix.dgs.codegen
gradle plugin seems to only generate projection ofRegardless of the
maxProjectionDepth
property of thegenerateJava
task, it seems the recursion always stops at the first loop reference in the schema.Is there any way around this?
Beta Was this translation helpful? Give feedback.
All reactions