mirror of
https://github.com/hasura/graphql-engine.git
synced 2025-01-07 08:13:18 +03:00
e0c0043e76
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9284 GitOrigin-RevId: 2f2cf2ad01900a54e4bdb970205ac0ef313c7e00
25 lines
806 B
Haskell
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
|