haskell-graphql / graphql-api

Write type-safe GraphQL services in Haskell
BSD 3-Clause "New" or "Revised" License
406 stars 35 forks source link

QuickCheck tests for value correctness #23

Closed jml closed 7 years ago

jml commented 7 years ago

All the stuff in GraphQL.Value should have generators and quickcheck tests. It's pretty fundamental, but a lot of work.

@teh Do you have any opinion about whether we should put Arbitrary instances in the library? My current feeling is custom generators in the tests, e.g.

validName :: Gen Name
validName = Name <$> arbitrary

validObject :: Gen Object
-- and so forth ...