Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- fetchRemoteSchema :: forall m. (MonadIO m, MonadError QErr m, MonadTrace m, ProvidesNetwork m) => Environment -> ValidatedRemoteSchemaDef -> m (IntrospectionResult, ByteString, RemoteSchemaInfo)
- stitchRemoteSchema :: (MonadIO m, MonadError QErr m) => ByteString -> ValidatedRemoteSchemaDef -> m (IntrospectionResult, RemoteSchemaInfo)
- execRemoteGQ :: (MonadIO m, MonadError QErr m, MonadTrace m, ProvidesNetwork m) => Environment -> UserInfo -> [Header] -> ValidatedRemoteSchemaDef -> GQLReqOutgoing -> m (DiffTime, [Header], ByteString)
- newtype FromIntrospection a = FromIntrospection {
- fromIntrospection :: a
Documentation
fetchRemoteSchema :: forall m. (MonadIO m, MonadError QErr m, MonadTrace m, ProvidesNetwork m) => Environment -> ValidatedRemoteSchemaDef -> m (IntrospectionResult, ByteString, RemoteSchemaInfo) 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.
stitchRemoteSchema :: (MonadIO m, MonadError QErr m) => ByteString -> ValidatedRemoteSchemaDef -> m (IntrospectionResult, RemoteSchemaInfo) Source #
Parses the remote schema introspection result, and check whether it looks like it's a valid GraphQL endpoint even under the configured customization.
:: (MonadIO m, MonadError QErr m, MonadTrace m, ProvidesNetwork m) | |
=> Environment | |
-> 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.
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.