Specify GQLType __name? #558
Labels
feature
good first issue
Good for newcomers
help wanted
Extra attention is needed
scope/server
morpheus-graphql
Hey, thanks for the great library!
Is it possible to specify the GQLType name? Looking through the source, it looks like it'd be possible if
Data.Morpheus.Server.Types.GQLType
exposedmkTypeData
andGQLType
exposed__type
.My use case is that I use a single ID type for all of my DB ids with a phantom type to ensure type safety:
This works great, but moprheus generates GQL type names for this like
Id_UserIdPhantom
andId_AccountIdPhantom
. This is fine, but on the client it's a bit vebose to read and the client doesn't really care about the phantom stuff. I think the names are coming from fromData.Morpheus.Server.Types.GQLType.deriveTypeData
andTypeable
. It would be cool if I could override this with something like:The text was updated successfully, but these errors were encountered: