mirror of
https://github.com/higherkindness/mu-haskell.git
synced 2024-08-17 02:10:22 +03:00
Fix TH generation for GraphQL input objects (#276)
This commit is contained in:
parent
e9d55fd6bf
commit
b56357c0b7
1
.github/workflows/deploy.yml
vendored
1
.github/workflows/deploy.yml
vendored
@ -37,6 +37,7 @@ jobs:
|
||||
sudo apt-get install ruby-dev
|
||||
sudo gem install bundler --force
|
||||
sudo gem update --system
|
||||
sudo bundle update --bundler
|
||||
sudo bundle install --gemfile docs/Gemfile --path vendor/bundle
|
||||
- name: Build microsite from last release
|
||||
run: |
|
||||
|
@ -194,11 +194,11 @@ typeToDec _ _ _ (GQL.InputObjectTypeDefinition _ name _ fields) =
|
||||
ginputTypeToType (GQL.TypeNonNull (GQL.NonNullTypeNamed a)) =
|
||||
[t| $(typeToPrimType a) |]
|
||||
ginputTypeToType (GQL.TypeNonNull (GQL.NonNullTypeList a)) =
|
||||
[t| 'ListRef $(ginputTypeToType a) |]
|
||||
[t| 'TList $(ginputTypeToType a) |]
|
||||
ginputTypeToType (GQL.TypeNamed a) =
|
||||
[t| 'OptionalRef $(typeToPrimType a) |]
|
||||
[t| 'TOption $(typeToPrimType a) |]
|
||||
ginputTypeToType (GQL.TypeList a) =
|
||||
[t| 'OptionalRef ('ListRef $(ginputTypeToType a)) |]
|
||||
[t| 'TOption ('TList $(ginputTypeToType a)) |]
|
||||
typeToPrimType :: GQL.Name -> Q Type
|
||||
typeToPrimType "Int" = [t|'TPrimitive Integer|]
|
||||
typeToPrimType "Float" = [t|'TPrimitive Double|]
|
||||
|
Loading…
Reference in New Issue
Block a user