juancastillo0 / leto

Dart GraphQL server libraries. Utilities, code generator, examples and reference implementation.
https://juancastillo0.github.io/leto/
MIT License
38 stars 6 forks source link

Default scalar type coercion cannot be changed for "primitive" types #11

Closed warrenisarobot closed 1 year ago

warrenisarobot commented 1 year ago

Default scalar type coercion cannot be changed when it is one of the leto_generator "primitive" types.

We are using graph "stitching" via a graphql proxy. Our other graph servers expose "Datetime" and "Date" types. Leto uses "Date" as a DateTime (dart does not have a Date type). I want to expose our custom Date type as a Graphql "Date" type, and the dart DateTime as "Datetime".

Using customTypes with leto_builder does not override the primitive types.

I have included a PR that move the primitive types logic below customTypes so that it will use a primitive type only if no customType was defined

12

warrenisarobot commented 1 year ago

This has been merged, closing the issue