graphql-engine/server/src-lib/Hasura/RQL/DDL/GraphqlSchemaIntrospection.hs
Tom Harding e0c0043e76 Upgrade Ormolu to 0.7.0.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9284
GitOrigin-RevId: 2f2cf2ad01900a54e4bdb970205ac0ef313c7e00
2023-05-24 13:53:53 +00:00

25 lines
806 B
Haskell

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