-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: configure codegen to add @sharable directive in PageInfo type #1762
Comments
@kilink can we have something like this? |
to be precise the @connection generates the relay pagination types dynamically and adds them to schema,
|
HI - codegen is not used to generate SDL. It only generates POJOs based on a statically defined SDL. The framework handles basic dynamic generation of SDL for pagination. If you require more custom logioc, directives, it would be better to manually add that to your SDL rather than using the Hope this helps. |
I think for your custom For the |
Closing this issue because we want to avoid adding more flags and customization to Codegen whenever possible to avoid complexity of the plugin. Since there is a workaround for this issue we shouldn't add it to codegen. |
Please read our contributor guide before
creating an issue. Also consider discussing your idea on
the discussion forum first.
Describe the Feature Request
Add custom directives like
@cacheControl(maxAge: 30) @shareable @tag(name: "public")
to generated types when using codegen to types like Pageinfo and other Connection Types and reflect in the SDL of a running graphql project/serverthe generated PageInfo Type should look like below in the SDL:
Also can the Connection Type can have 1 more additional field
totalCount
so that the SDL can look like below:This will be beneficial to show in UI something like
showing results 1-10 out of 500(totalCount) records
Describe Preferred Solution
Allow configuration in pom file in pom or gradle to mention to add @sharable tags in PageInfo tags while generating it and result it in the final SDL
Describe Alternatives
None as such
The text was updated successfully, but these errors were encountered: