artemis icon indicating copy to clipboard operation
artemis copied to clipboard

Anotate class to map to scalar

Open tdnghia98 opened this issue 4 years ago • 2 comments

Hi

I tried to incorporate Artemis with my already working Hasura endpoint, the problem is Hasura generates multiple types, and it is very confusing if I have to declare the mappers of all these in the build.yaml

Is there any planning on annotating the class to map to scalar? I think that it would be very useful

tdnghia98 avatar Jan 13 '21 18:01 tdnghia98

Hello @tdnghia98! Do you have any example of how would that work? Today, as a generator, artemis only have configurations on build.yaml file.

comigor avatar Jan 13 '21 18:01 comigor

Hello @comigor Sorry for the late reply. The idea is like when using freezed package or json_serializable where you can simply annotate the class and there will be generated code. So for example if I can annotate a query class with @query and mutation class with @mutation and then have the generated types for the input fields and the output result that would be great. As I understand for now I have to manually write parser for these and include them in the build.yaml file

tdnghia98 avatar Jan 21 '21 09:01 tdnghia98