graphql-engine/server/src-lib/Hasura/RQL/DDL/GraphqlSchemaIntrospection.hs
Antoine Leblanc 2152911e24 server: introduce Hasura.Base (take 2)
GitOrigin-RevId: 0dd10f1ccd338b1cf382ebff59b6ee7f209d39a1
2021-05-11 15:19:33 +00:00

21 lines
602 B
Haskell

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