mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-20 05:51:54 +03:00
aa18f65217
It's about time. To do this I had to check a few more boxes. * I copied the flags from `graphql-engine.cabal` to the libraries in `server/lib`. * I moved `Cacheable` instances of schema parser types beside the typeclass declaration. * I removed imports of `Hasura.Prelude` from the tests, and rewrote them accordingly. * I copied the `TestMonad` parse monad into `server/src-test/Hasura/GraphQL/Schema/RemoteTest.hs`, which was using it. I think this could be done with the real thing, but I tried replacing it with constraints and it messed with my head somewhat. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5311 GitOrigin-RevId: ebebcc50a16f2d517b7f730fe72410827ca3e86c
17 lines
556 B
Haskell
17 lines
556 B
Haskell
{-# OPTIONS_GHC -Wno-orphans #-}
|
|
|
|
module Hasura.GraphQL.Parser.TestInstances () where
|
|
|
|
import Data.Text qualified as Text
|
|
import Hasura.Base.ErrorMessage (ErrorMessage, fromErrorMessage)
|
|
import Hasura.GraphQL.Parser.Monad (ParseError (..))
|
|
|
|
-- Orphan instances so that we can write assertions over 'Either ErrorMessage a'.
|
|
instance Show ErrorMessage where
|
|
show = Text.unpack . fromErrorMessage
|
|
|
|
-- Orphan instances so that we can write assertions over 'Either ParseError a'.
|
|
deriving stock instance Eq ParseError
|
|
|
|
deriving stock instance Show ParseError
|