Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Commit fcdb5d4

Browse files
authored
Fix TH generation for GraphQL input objects (#276)
1 parent b763d4f commit fcdb5d4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/deploy.yml

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
sudo apt-get install ruby-dev
3838
sudo gem install bundler --force
3939
sudo gem update --system
40+
sudo bundle update --bundler
4041
sudo bundle install --gemfile docs/Gemfile --path vendor/bundle
4142
- name: Build microsite from last release
4243
run: |

graphql/src/Mu/GraphQL/Quasi.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,11 @@ typeToDec _ _ _ (GQL.InputObjectTypeDefinition _ name _ fields) =
194194
ginputTypeToType (GQL.TypeNonNull (GQL.NonNullTypeNamed a)) =
195195
[t| $(typeToPrimType a) |]
196196
ginputTypeToType (GQL.TypeNonNull (GQL.NonNullTypeList a)) =
197-
[t| 'ListRef $(ginputTypeToType a) |]
197+
[t| 'TList $(ginputTypeToType a) |]
198198
ginputTypeToType (GQL.TypeNamed a) =
199-
[t| 'OptionalRef $(typeToPrimType a) |]
199+
[t| 'TOption $(typeToPrimType a) |]
200200
ginputTypeToType (GQL.TypeList a) =
201-
[t| 'OptionalRef ('ListRef $(ginputTypeToType a)) |]
201+
[t| 'TOption ('TList $(ginputTypeToType a)) |]
202202
typeToPrimType :: GQL.Name -> Q Type
203203
typeToPrimType "Int" = [t|'TPrimitive Integer|]
204204
typeToPrimType "Float" = [t|'TPrimitive Double|]

0 commit comments

Comments
 (0)