graphql-engine/server/src-lib/Hasura/RQL/DDL/GraphqlSchemaIntrospection.hs

21 lines
602 B
Haskell
Raw Normal View History

module Hasura.RQL.DDL.GraphqlSchemaIntrospection where
import Hasura.Prelude
import Control.Lens ((.~))
import Hasura.Base.Error
import Hasura.EncJSON
import Hasura.RQL.Types
runSetGraphqlSchemaIntrospectionOptions
:: (MonadError QErr m, MetadataM m, CacheRWM m)
=> SetGraphqlIntrospectionOptions -> m EncJSON
runSetGraphqlSchemaIntrospectionOptions introspectionOptions = do
withNewInconsistentObjsCheck
$ buildSchemaCache
$ MetadataModifier
$ metaSetGraphqlIntrospectionOptions .~ introspectionOptions
return successMsg