2021-11-04 19:08:33 +03:00
|
|
|
module Hasura.RQL.DDL.GraphqlSchemaIntrospection
|
|
|
|
( runSetGraphqlSchemaIntrospectionOptions,
|
|
|
|
)
|
|
|
|
where
|
2021-05-05 15:25:27 +03:00
|
|
|
|
2021-05-11 18:18:31 +03:00
|
|
|
import Control.Lens ((.~))
|
|
|
|
import Hasura.Base.Error
|
2021-05-05 15:25:27 +03:00
|
|
|
import Hasura.EncJSON
|
|
|
|
import Hasura.Prelude
|
2022-04-27 16:57:28 +03:00
|
|
|
import Hasura.RQL.Types.Common
|
|
|
|
import Hasura.RQL.Types.GraphqlSchemaIntrospection
|
|
|
|
import Hasura.RQL.Types.Metadata
|
|
|
|
import Hasura.RQL.Types.Metadata.Instances ()
|
|
|
|
import Hasura.RQL.Types.SchemaCache.Build
|
2021-05-05 15:25:27 +03:00
|
|
|
|
|
|
|
runSetGraphqlSchemaIntrospectionOptions ::
|
|
|
|
(MonadError QErr m, MetadataM m, CacheRWM m) =>
|
|
|
|
SetGraphqlIntrospectionOptions ->
|
|
|
|
m EncJSON
|
|
|
|
runSetGraphqlSchemaIntrospectionOptions introspectionOptions = do
|
|
|
|
withNewInconsistentObjsCheck $
|
|
|
|
buildSchemaCache $
|
|
|
|
MetadataModifier $
|
|
|
|
metaSetGraphqlIntrospectionOptions .~ introspectionOptions
|
|
|
|
return successMsg
|