Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capitalise scalar types generated by TH when they are lowercase #519

Closed
lukel97 opened this issue Sep 3, 2020 · 1 comment
Closed

Capitalise scalar types generated by TH when they are lowercase #519

lukel97 opened this issue Sep 3, 2020 · 1 comment

Comments

@lukel97
Copy link

lukel97 commented Sep 3, 2020

Some schemas generated by Hasura, for example, contain types that are all lower case:

scalar uuid

When using defineByDocumentFile, the code generated by Template Haskell complains that the type constructor is illegal as it doesn't begin with a capital letter:

Main.hs:15:1: error:
    Illegal type constructor or class name: ‘uuid’
    When splicing a TH declaration:
      data LookupSpotifyOAuthArgs
    = LookupSpotifyOAuthArgs {id :: (GHC.Maybe.Maybe uuid)}
    deriving GHC.Generics.Generic
    deriving GHC.Show.Show
    deriving GHC.Classes.Eq

Would it be possible to automatically convert these references of uuid to Uuid?

@nalchevanidze
Copy link
Member

nalchevanidze commented Sep 11, 2020

fixed in #526. please close this issue if it works for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants