File tree 1 file changed +6
-9
lines changed
server/src-lib/Hasura/GraphQL
1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -98,15 +98,12 @@ buildGQLContext =
98
98
-- build the admin context so that we can check against name clashes with remotes
99
99
adminHasuraContext <- bindA -< buildFullestDBSchema
100
100
101
- let queryFieldNames :: [G. Name ]
102
- queryFieldNames =
103
- case P. discardNullability $ P. parserType $ fst adminHasuraContext of
104
- P. TList _ -> []
105
- P. TNamed def ->
106
- case P. dInfo def of
107
- -- It really ought to be this case; anything else is a programming error.
108
- P. TIObject (P. ObjectInfo rootFields _interfaces) -> fmap P. dName rootFields
109
- _ -> []
101
+ queryFieldNames :: [G. Name ] <- bindA -<
102
+ case P. discardNullability $ P. parserType $ fst adminHasuraContext of
103
+ -- It really ought to be this case; anything else is a programming error.
104
+ P. TNamed (P. Definition _ _ _ (P. TIObject (P. ObjectInfo rootFields _interfaces))) ->
105
+ pure $ fmap P. dName rootFields
106
+ _ -> throw500 " We encountered an root query of unexpected GraphQL type. It should be an object type."
110
107
let mutationFieldNames :: [G. Name ]
111
108
mutationFieldNames =
112
109
case P. discardNullability . P. parserType <$> snd adminHasuraContext of
You can’t perform that action at this time.
0 commit comments