Add Custom directive to Relay Pagination types generated by codegen #1589
Replies: 2 comments 3 replies
-
|
Hi @yamalameyooooo - The use of |
Beta Was this translation helpful? Give feedback.
-
|
@yamalameyooooo opened an issue in the maven graphqlcodegen plugin for DGS related to this topic. I think the If folks have advanced Apollo schema composition pipelines they could inject additional directives into the schema JIT so that it's there for Apollo and the Federated ecosystem. Not everyone has that infrastructure built though. I think we could drive customization of the dynamic connection types in an elegant way either via additional schema directives or via Spring configuration. Spitballing here but... perhaps something like this where we're explicit about what to include with dynamic connection types:
or maybe the rule is to just propagate them all:
With Spring config maybe? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Currently i am using codegen to generate the Types related to relay pagination whereever i have added @connection directive.
Sample schema file:
my codegen configuration:
the outcome of the schema in runtime(verified by the sdl too):
As you can see, codegen created 3 types in runtime that is MessageConnection, MessageEdge and PageInfo
but i need my custom directive @Shareable on these 3 directives too. like this:
How can i and what to configure in codegen configuration to get something like this above in this configuration?
@srinivasankavitha can you guide me in this problem statement, as my this is going to be in federated in a supergraph and there are other identical types too which is giving a clash.
kindly let me know how can i add this directive in the codegen generated relay pagination types
Beta Was this translation helpful? Give feedback.
All reactions