forked from OSS/graphql
Document usage of the json flag
This commit is contained in:
parent
0d25f482dd
commit
0dac9701bc
@ -10,6 +10,11 @@ and this project adheres to
|
|||||||
### Changed
|
### Changed
|
||||||
- Removed deprecated `Language.GraphQL.Error` functions: `addErr`, `addErrMsg`,
|
- Removed deprecated `Language.GraphQL.Error` functions: `addErr`, `addErrMsg`,
|
||||||
`singleError`.
|
`singleError`.
|
||||||
|
- Deprecate `Resolution`, `CollectErrsT` and `runCollectErrs` in the `Error`
|
||||||
|
module. It was already noted in the documentation that these symbols are
|
||||||
|
deprecated, now a pragma is added.
|
||||||
|
- `Language.GraphQL`: Added information about the *json* flag and switching to
|
||||||
|
*graphql-spice* for JSON support.
|
||||||
|
|
||||||
## [1.0.3.0] - 2022-03-27
|
## [1.0.3.0] - 2022-03-27
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@ -22,7 +22,7 @@ extra-source-files:
|
|||||||
README.md
|
README.md
|
||||||
tested-with:
|
tested-with:
|
||||||
GHC == 8.10.7,
|
GHC == 8.10.7,
|
||||||
GHC == 9.2.2
|
GHC == 9.2.3
|
||||||
|
|
||||||
source-repository head
|
source-repository head
|
||||||
type: git
|
type: git
|
||||||
|
@ -4,6 +4,28 @@
|
|||||||
|
|
||||||
#ifdef WITH_JSON
|
#ifdef WITH_JSON
|
||||||
-- | This module provides the functions to parse and execute @GraphQL@ queries.
|
-- | This module provides the functions to parse and execute @GraphQL@ queries.
|
||||||
|
--
|
||||||
|
-- The content of this module depends on the value of the __json__ flag, which
|
||||||
|
-- is currently on by default. This behavior will change in the future, the flag
|
||||||
|
-- will be switched off by default and then removed.
|
||||||
|
--
|
||||||
|
-- This documentation is generated with the enabled __json__ flag and functions
|
||||||
|
-- described here support JSON and are deprecated. JSON instances are provided
|
||||||
|
-- now by an additional package, __graphql-spice__. To start using the new
|
||||||
|
-- package create __cabal.project__ in the root directory of your project with
|
||||||
|
-- the following contents:
|
||||||
|
--
|
||||||
|
-- @
|
||||||
|
-- packages: .
|
||||||
|
-- constraints: graphql -json
|
||||||
|
-- @
|
||||||
|
--
|
||||||
|
-- Then add __graphql-spice__ as dependency.
|
||||||
|
--
|
||||||
|
-- The new version of this module defines only one function, @graphql@, which
|
||||||
|
-- works with the internal GraphQL value representation used by this lbirary.
|
||||||
|
-- Refer to @Language.GraphQL.JSON.graphql@ in __graphql-spice__ for the
|
||||||
|
-- function that accepts and returns JSON.
|
||||||
module Language.GraphQL
|
module Language.GraphQL
|
||||||
( graphql
|
( graphql
|
||||||
, graphqlSubs
|
, graphqlSubs
|
||||||
|
@ -103,8 +103,8 @@ instance Exception ResolverException
|
|||||||
-- | Runs the given query computation, but collects the errors into an error
|
-- | Runs the given query computation, but collects the errors into an error
|
||||||
-- list, which is then sent back with the data.
|
-- list, which is then sent back with the data.
|
||||||
--
|
--
|
||||||
-- /runCollectErrs was part of the old executor and isn't used anymore, it will
|
-- {-# DEPRECATED runCollectErrs was part of the old executor and isn't used
|
||||||
-- be deprecated in the future and removed./
|
-- anymore #-}
|
||||||
runCollectErrs :: (Monad m, Serialize a)
|
runCollectErrs :: (Monad m, Serialize a)
|
||||||
=> HashMap Name (Schema.Type m)
|
=> HashMap Name (Schema.Type m)
|
||||||
-> CollectErrsT m a
|
-> CollectErrsT m a
|
||||||
@ -116,8 +116,8 @@ runCollectErrs types' res = do
|
|||||||
|
|
||||||
-- | Executor context.
|
-- | Executor context.
|
||||||
--
|
--
|
||||||
-- /Resolution was part of the old executor and isn't used anymore, it will be
|
-- {-# DEPRECATED Resolution was part of the old executor and isn't used
|
||||||
-- deprecated in the future and removed./
|
-- anymore #-}
|
||||||
data Resolution m = Resolution
|
data Resolution m = Resolution
|
||||||
{ errors :: Seq Error
|
{ errors :: Seq Error
|
||||||
, types :: HashMap Name (Schema.Type m)
|
, types :: HashMap Name (Schema.Type m)
|
||||||
@ -125,6 +125,6 @@ data Resolution m = Resolution
|
|||||||
|
|
||||||
-- | A wrapper to pass error messages around.
|
-- | A wrapper to pass error messages around.
|
||||||
--
|
--
|
||||||
-- /CollectErrsT was part of the old executor and isn't used anymore, it will be
|
-- {-# DEPRECATED CollectErrsT was part of the old executor and isn't used
|
||||||
-- deprecated in the future and removed./
|
-- anymore #-}
|
||||||
type CollectErrsT m = StateT (Resolution m) m
|
type CollectErrsT m = StateT (Resolution m) m
|
||||||
|
@ -8,6 +8,11 @@
|
|||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
|
|
||||||
-- | Types and functions used for input and result coercion.
|
-- | Types and functions used for input and result coercion.
|
||||||
|
--
|
||||||
|
-- JSON instances in this module are only available with the __json__
|
||||||
|
-- flag that is currently on by default, but will be disabled in the future.
|
||||||
|
-- Refer to the documentation in the 'Language.GraphQL' module and to
|
||||||
|
-- the __graphql-spice__ package.
|
||||||
module Language.GraphQL.Execute.Coerce
|
module Language.GraphQL.Execute.Coerce
|
||||||
( Output(..)
|
( Output(..)
|
||||||
, Serialize(..)
|
, Serialize(..)
|
||||||
|
Loading…
Reference in New Issue
Block a user