You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
Sometimes, user-defined dart type and generated code result in naming conflict.
I understand to use naming_scheme: pathedWithTypes for those cases.
However, people can still want to use naming_scheme: simple, in some cases.
@jjangga0214 as you see from your screenshot those prefix applied to all types so instead two equal types ProductDetails you will get two equal types GqlProductDetails
I guess what I meant by Sometimes, user-defined dart type and generated code result in naming conflict. is different from your understanding.
For example, let's say my graphql schema has ProductDetails type. Then Artemis generates the the type ProductDetails in dart, with naming_scheme: simple. However, I may still want to create (by myself) a type ProductDetails as a domain type, which might have related functions I want to define. If so, a naming conflict occurs.
So, what I meant by user-defined dart type is irrelevant from Artemis.
Of course, if names conflict, we can use as keyward when importing.
However, the point of this issue is that Artemis might become more flexible if prefix option is supported.
By the way, what was your original meaning?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi!
Thank you for this great package!
Sometimes, user-defined dart type and generated code result in naming conflict.
I understand to use
naming_scheme: pathedWithTypes
for those cases.However, people can still want to use
naming_scheme: simple
, in some cases.For them, a concept of
prefix
would be very helpful.For instance,
graphql-code-generator
(npm) does support this feature.https://www.graphql-code-generator.com/docs/plugins/typescript
So, if I set it to
Gql
for example, types are generated like as,GqlFoo
orGqlBar
, notFoo
orBar
.How do you think?
Thanks :)
The text was updated successfully, but these errors were encountered: