Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- fetchRemoteSchema :: forall m. (MonadIO m, MonadError QErr m, MonadTrace m) => Environment -> Manager -> RemoteSchemaName -> ValidatedRemoteSchemaDef -> m RemoteSchemaCtx
- execRemoteGQ :: (MonadIO m, MonadError QErr m, MonadTrace m) => Environment -> Manager -> UserInfo -> [Header] -> ValidatedRemoteSchemaDef -> GQLReqOutgoing -> m (DiffTime, [Header], ByteString)
- validateSchemaCustomizations :: forall m. MonadError QErr m => RemoteSchemaCustomizer -> RemoteSchemaIntrospection -> m ()
- validateSchemaCustomizationsConsistent :: forall m. MonadError QErr m => RemoteSchemaCustomizer -> RemoteSchemaIntrospection -> m ()
- validateSchemaCustomizationsDistinct :: forall m. MonadError QErr m => RemoteSchemaCustomizer -> RemoteSchemaIntrospection -> m ()
- introspectionQuery :: GQLReqOutgoing
- newtype FromIntrospection a = FromIntrospection {
- fromIntrospection :: a
- getCustomizer :: IntrospectionResult -> Maybe RemoteSchemaCustomization -> RemoteSchemaCustomizer
- pErr :: MonadFail m => Text -> m a
- kindErr :: MonadFail m => Text -> Text -> m a
- throwRemoteSchema :: QErrM m => Text -> m a
- throwRemoteSchemaHttp :: QErrM m => EnvRecord URI -> HttpException -> m a
Documentation
fetchRemoteSchema :: forall m. (MonadIO m, MonadError QErr m, MonadTrace m) => Environment -> Manager -> RemoteSchemaName -> ValidatedRemoteSchemaDef -> m RemoteSchemaCtx Source #
Make an introspection query to the remote graphql server for the data we need to present and stitch the remote schema. This powers add_remote_schema, and also is called by schema cache rebuilding code in Hasura.RQL.DDL.Schema.Cache.
:: (MonadIO m, MonadError QErr m, MonadTrace m) | |
=> Environment | |
-> Manager | |
-> UserInfo | |
-> [Header] | |
-> ValidatedRemoteSchemaDef | |
-> GQLReqOutgoing | |
-> m (DiffTime, [Header], ByteString) | Returns the response body and headers, along with the time taken for the HTTP request to complete |
Sends a GraphQL query to the given server.
validateSchemaCustomizations :: forall m. MonadError QErr m => RemoteSchemaCustomizer -> RemoteSchemaIntrospection -> m () Source #
validateSchemaCustomizationsConsistent :: forall m. MonadError QErr m => RemoteSchemaCustomizer -> RemoteSchemaIntrospection -> m () Source #
validateSchemaCustomizationsDistinct :: forall m. MonadError QErr m => RemoteSchemaCustomizer -> RemoteSchemaIntrospection -> m () Source #
newtype FromIntrospection a Source #
Parsing the introspection query result. We use this newtype wrapper to avoid orphan instances and parse JSON in the way that we need for GraphQL introspection results.
getCustomizer :: IntrospectionResult -> Maybe RemoteSchemaCustomization -> RemoteSchemaCustomizer Source #
throwRemoteSchema :: QErrM m => Text -> m a Source #
throwRemoteSchemaHttp :: QErrM m => EnvRecord URI -> HttpException -> m a Source #