2021-05-05 15:25:27 +03:00
|
|
|
module Hasura.RQL.DDL.GraphqlSchemaIntrospection where
|
|
|
|
|
|
|
|
import Hasura.Prelude
|
|
|
|
|
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.RQL.Types
|
|
|
|
|
2021-05-11 18:18:31 +03:00
|
|
|
|
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
|