Skip to content

Commit dc81779

Browse files
committed
Drop done / unwanted TODOs
@teh please check that I haven't overstepped here.
1 parent cef5412 commit dc81779

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

src/GraphQL/Resolver.hs

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
{-# LANGUAGE UndecidableInstances #-} -- for TypeError
1515

1616
module GraphQL.Resolver
17-
( ResolverError(..) -- XXX: Exporting constructor for tests. Not sure if that's what we really want.
17+
( ResolverError(..)
1818
, HasResolver(..)
1919
, (:<>)(..)
2020
, Defaultable(..)
@@ -217,24 +217,11 @@ instance forall m ksN enum. (Applicative m, API.GraphQLEnum enum) => HasResolver
217217
type Handler m (API.Enum ksN enum) = enum
218218
resolve handler _ = (pure . ok . GValue.ValueEnum . API.enumToValue) handler
219219

220-
221-
-- TODO: variables should error, they should have been resolved already.
222-
--
223-
-- TODO: Objects. Maybe implement some Generic object reader? I.e. if I do
224-
-- data Greet = Greet { name :: Text, score :: Int } deriving Generic
225-
-- then "instance ReadValue Greet" would fall back on a default reader that
226-
-- expects Objects?
227-
-- Maybe we can use advanced fallbacks like these:
228-
-- https://wiki.haskell.org/GHC/AdvancedOverlap
229-
230-
231-
-- Iterate through handlers (zipped together with their type
232-
-- definition) and execute handler if the name matches.
233-
234-
-- TODO: A parametrized `Result` is really not a good way to handle
235-
-- the "result" for resolveField, but not sure what to use either. I
236-
-- liked the tuple we had before more because it didn't imply any
237-
-- other structure or meaning. Maybe we can jsut create a new datatype.
220+
-- TODO: A parametrized `Result` is really not a good way to handle the
221+
-- "result" for resolveField, but not sure what to use either. Tom liked the
222+
-- tuple we had before more because it didn't imply any other structure or
223+
-- meaning. Maybe we can just create a new datatype. jml thinks we should
224+
-- extract some helpful generic monad, ala `Validator`.
238225
type ResolveFieldResult = Result (Maybe GValue.ObjectField)
239226

240227
-- Extract field name from an argument type. TODO: ideally we'd run

0 commit comments

Comments
 (0)