2021-11-04 19:08:33 +03:00
|
|
|
module Hasura.RQL.DDL.GraphqlSchemaIntrospection
|
|
|
|
( runSetGraphqlSchemaIntrospectionOptions,
|
|
|
|
)
|
|
|
|
where
|
2021-05-05 15:25:27 +03:00
|
|
|
|
2021-09-24 01:56:37 +03:00
|
|
|
import Control.Lens ((.~))
|
|
|
|
import Hasura.Base.Error
|
|
|
|
import Hasura.EncJSON
|
|
|
|
import Hasura.Prelude
|
|
|
|
import Hasura.RQL.Types
|
2021-05-05 15:25:27 +03:00
|
|
|
|
2021-09-24 01:56:37 +03:00
|
|
|
runSetGraphqlSchemaIntrospectionOptions ::
|
|
|
|
(MonadError QErr m, MetadataM m, CacheRWM m) =>
|
|
|
|
SetGraphqlIntrospectionOptions ->
|
|
|
|
m EncJSON
|
2021-05-05 15:25:27 +03:00
|
|
|
runSetGraphqlSchemaIntrospectionOptions introspectionOptions = do
|
2021-09-24 01:56:37 +03:00
|
|
|
withNewInconsistentObjsCheck $
|
|
|
|
buildSchemaCache $
|
|
|
|
MetadataModifier $
|
|
|
|
metaSetGraphqlIntrospectionOptions .~ introspectionOptions
|
2021-05-05 15:25:27 +03:00
|
|
|
return successMsg
|