Replies: 1 comment
-
I recherched a little bit on my own and maybe i could do the transformation with those INPUT_FIELD_DEFINITION Directive. But I didn't found anything on the internet regarding directives on input types only for normal types... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I think I have a more specific problem when dealing with "DGS" because I haven't found a solution online or in the docs.
It is about the conversion of int and string values which cannot be mapped to the corresponding enums on the server.
Due to the legacy of our system and with the agreement of my colleagues, it is unfortunately not possible to build the enums in the GraphQL schema. So my plan was to run the enum values of the client system via the schema as INT and STRING values (depending on which values are given) and then map them to the corresponding enums using DGS.
Unfortunately, this does not seem to work. I had already thought of something similar for the string values, but that at least the INT values could be mapped.
Is there a good workaround for this problem or is there a possibility to declare internal values in the schema for enums with DGS in the future?
Backend-Enum:
Other enum:
Model of TypeFilter:
Schema:
In case of state there would be a "1" coming from the client and will be mapped as null in the backend.
In case of opening there would be a "manual_closing" coming from the client and will be mapped as null in the backend.
--- Versions ---
graphql-dgs-spring-boot-starter : 7.3.6
graphql-java : 21
Beta Was this translation helpful? Give feedback.
All reactions