@@ -255,11 +255,21 @@ field name t =
255255 , args: {}
256256 , serialize
257257 , argumentIntrospections: []
258− , typeIntrospection: \_ -> introspect t }
258+ , typeIntrospection }
259259 where
260− serialize (AST.FieldNode node) variables _ val = output t node.selectionSet variables val
260+ serialize (AST.FieldNode node) execCtx _ val = output t node.selectionSet execCtx val
261261 serialize _ _ _ _ = pure $ ResultError "Obtained non FieldNode for field serialisation."
262262
263+ typeIntrospection _ =
264+ IntrospectionTypes.TypeIntrospection
265+ { kind: IntrospectionTypes.NonNull
266+ , name: Nothing
267+ , description: Nothing
268+ , fields: Nothing
269+ , enumValues: Nothing
270+ , ofType: Just $ \_ -> introspect t
271+ }
272+
263273-- | Create a new field for an object type that is a list. You can return any `Foldable` in the
264274-- | resolver.
265275listField :: forall m f t a.
@@ -287,12 +297,20 @@ listField name t =
287297
288298 typeIntrospection _ =
289299 IntrospectionTypes.TypeIntrospection
290− { kind: IntrospectionTypes.List
300+ { kind: IntrospectionTypes.NonNull
291301 , name: Nothing
292302 , description: Nothing
293303 , fields: Nothing
294304 , enumValues: Nothing
295− , ofType: Just $ \_ -> introspect t
305+ , ofType: Just $ \_ ->
306+ IntrospectionTypes.TypeIntrospection
307+ { kind: IntrospectionTypes.List
308+ , name: Nothing
309+ , description: Nothing
310+ , fields: Nothing
311+ , enumValues: Nothing
312+ , ofType: Just $ \_ -> introspect t
313+ }
296314 }
297315
298316-- | Create a new field for an object type that is optional (i.e. it can be null). The resolver
@@ -324,15 +342,7 @@ nullableField name t =
324342 serialize _ _ _ _ =
325343 pure $ ResultError "Obtained non FieldNode for field serialisation."
326344
327− typeIntrospection _ =
328− IntrospectionTypes.TypeIntrospection
329− { kind: IntrospectionTypes.NonNull
330− , name: Nothing
331− , description: Nothing
332− , fields: Nothing
333− , enumValues: Nothing
334− , ofType: Just $ \_ -> introspect t
335− }
345+ typeIntrospection _ = introspect t
336346
337347-- | Create a new field for an object type that is optional (i.e. it can be null) and returns a
338348-- | list. The resolver must now return a `Maybe`.
@@ -369,20 +379,12 @@ nullableListField name t =
369379
370380 typeIntrospection _ =
371381 IntrospectionTypes.TypeIntrospection
372− { kind: IntrospectionTypes.NonNull
382+ { kind: IntrospectionTypes.List
373383 , name: Nothing
374384 , description: Nothing
375385 , fields: Nothing
376386 , enumValues: Nothing
377− , ofType: Just $ \_ ->
378− IntrospectionTypes.TypeIntrospection
379− { kind: IntrospectionTypes.List
380− , name: Nothing
381− , description: Nothing
382− , fields: Nothing
383− , enumValues: Nothing
384− , ofType: Just $ \_ -> introspect t
385− }
387+ , ofType: Just $ \_ -> introspect t
386388 }
387389
388390-- | Create a tuple with a given name and a plain argument of the given type.