mirror of
https://github.com/hasura/graphql-engine.git
synced 2025-01-05 22:34:22 +03:00
update packages (#251)
* move to stackage 12.4 * upgrade pg-client * docker build improvements
This commit is contained in:
parent
cffa808d19
commit
c901767cd1
4
server/.dockerignore
Normal file
4
server/.dockerignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
.stack-work*
|
||||||
|
graphql-engine.prof*
|
||||||
|
ws
|
||||||
|
graphiql
|
@ -2,7 +2,8 @@ project := graphql-engine
|
|||||||
registry := hasura
|
registry := hasura
|
||||||
version := $(shell ../scripts/get-version.sh)
|
version := $(shell ../scripts/get-version.sh)
|
||||||
|
|
||||||
stack_resolver := lts-11.15
|
# TODO: needs to be replaced with something like yq
|
||||||
|
stack_resolver := $(shell grep '^resolver:' stack.yaml | awk '{print $$2;}')
|
||||||
packager_ver := 1.2
|
packager_ver := 1.2
|
||||||
project_dir := $(shell pwd)
|
project_dir := $(shell pwd)
|
||||||
build_dir := $(project_dir)/$(shell stack path --dist-dir)/build
|
build_dir := $(project_dir)/$(shell stack path --dist-dir)/build
|
||||||
|
@ -30,7 +30,8 @@ runGQ pool isoL userInfo gCtxMap req = do
|
|||||||
(opTy, fields) <- runReaderT (VQ.validateGQ req) gCtx
|
(opTy, fields) <- runReaderT (VQ.validateGQ req) gCtx
|
||||||
when (opTy == G.OperationTypeSubscription) $ throw400 UnexpectedPayload
|
when (opTy == G.OperationTypeSubscription) $ throw400 UnexpectedPayload
|
||||||
"subscriptions are not supported over HTTP, use websockets instead"
|
"subscriptions are not supported over HTTP, use websockets instead"
|
||||||
resp <- runTx $ R.resolveSelSet userInfo gCtx opTy fields
|
let tx = R.resolveSelSet userInfo gCtx opTy fields
|
||||||
|
resp <- liftIO (runExceptT $ runTx tx) >>= liftEither
|
||||||
return $ encodeGQResp $ GQSuccess resp
|
return $ encodeGQResp $ GQSuccess resp
|
||||||
where
|
where
|
||||||
gCtx = getGCtx (userRole userInfo) gCtxMap
|
gCtx = getGCtx (userRole userInfo) gCtxMap
|
||||||
|
@ -115,7 +115,9 @@ runQuery
|
|||||||
-> RQLQuery -> m (BL.ByteString, SchemaCache)
|
-> RQLQuery -> m (BL.ByteString, SchemaCache)
|
||||||
runQuery pool isoL userInfo sc query = do
|
runQuery pool isoL userInfo sc query = do
|
||||||
tx <- liftEither $ buildTxAny userInfo sc query
|
tx <- liftEither $ buildTxAny userInfo sc query
|
||||||
Q.runTx pool (isoL, Nothing) $ setHeadersTx userInfo >> tx
|
res <- liftIO $ runExceptT $ Q.runTx pool (isoL, Nothing) $
|
||||||
|
setHeadersTx userInfo >> tx
|
||||||
|
liftEither res
|
||||||
|
|
||||||
buildExplainTx
|
buildExplainTx
|
||||||
:: UserInfo
|
:: UserInfo
|
||||||
@ -131,10 +133,9 @@ buildExplainTx userInfo sc q = do
|
|||||||
qEnv = QCtx userInfo sc
|
qEnv = QCtx userInfo sc
|
||||||
|
|
||||||
runExplainQuery
|
runExplainQuery
|
||||||
:: (MonadIO m, MonadError QErr m)
|
:: Q.PGPool -> Q.TxIsolation
|
||||||
=> Q.PGPool -> Q.TxIsolation
|
|
||||||
-> UserInfo -> SchemaCache
|
-> UserInfo -> SchemaCache
|
||||||
-> SelectQuery -> m BL.ByteString
|
-> SelectQuery -> ExceptT QErr IO BL.ByteString
|
||||||
runExplainQuery pool isoL userInfo sc query = do
|
runExplainQuery pool isoL userInfo sc query = do
|
||||||
tx <- liftEither $ buildExplainTx userInfo sc query
|
tx <- liftEither $ buildExplainTx userInfo sc query
|
||||||
Q.runTx pool (isoL, Nothing) $ setHeadersTx userInfo >> tx
|
Q.runTx pool (isoL, Nothing) $ setHeadersTx userInfo >> tx
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
|
# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
|
||||||
# resolver: lts-10.8
|
# resolver: lts-10.8
|
||||||
resolver: lts-11.15
|
resolver: lts-12.4
|
||||||
|
|
||||||
# Local packages, usually specified by relative directory name
|
# Local packages, usually specified by relative directory name
|
||||||
packages:
|
packages:
|
||||||
- '.'
|
- '.'
|
||||||
# - '../../../graphql-parser-hs'
|
# - '../../graphql-parser-hs'
|
||||||
# - extra-libs/aeson
|
# - extra-libs/aeson
|
||||||
# - extra-libs/logger/wai-logger
|
# - extra-libs/logger/wai-logger
|
||||||
|
|
||||||
@ -16,9 +16,11 @@ extra-deps:
|
|||||||
# use https URLs so that build systems can clone these repos
|
# use https URLs so that build systems can clone these repos
|
||||||
# - graphql-api-0.3.0
|
# - graphql-api-0.3.0
|
||||||
- git: https://github.com/hasura/pg-client-hs.git
|
- git: https://github.com/hasura/pg-client-hs.git
|
||||||
commit: 77995388cab656f9180b851f33f3d603cf1017c7
|
commit: e61bc37794b4d9e281bad44b2d7c8d35f2dbc770
|
||||||
- git: https://github.com/hasura/graphql-parser-hs.git
|
- git: https://github.com/hasura/graphql-parser-hs.git
|
||||||
commit: eae59812ec537b3756c3ddb5f59a7cc59508869b
|
commit: eae59812ec537b3756c3ddb5f59a7cc59508869b
|
||||||
|
- Spock-core-0.13.0.0
|
||||||
|
- reroute-0.5.0.0
|
||||||
|
|
||||||
# Override default flag values for local packages and extra-deps
|
# Override default flag values for local packages and extra-deps
|
||||||
flags: {}
|
flags: {}
|
||||||
|
Loading…
Reference in New Issue
Block a user