nhost_graphql_adapter library

Constants

webSocketNormalCloseCode → const int
The code sent to the server when the socket closes in order to send new authentication information.

Functions

combinedLinkForNhost(NhostClientBase nhostClient, {Map<String, String>? defaultHeaders, Client? httpClientOverride}) → Link
Creates a link that that configures automatically based on nhostClient's authentication state, and will select HTTP or Web Socket transport as appropriate.
combinedLinkForNhostAuth(String nhostGqlEndpointUrl, HasuraAuthClient nhostAuth, {Map<String, String>? defaultHeaders, Client? httpClientOverride}) → Link
Creates a link that that configures automatically based on nhostAuth's authentication state. The returned link will select HTTP or Web Socket transport as appropriate based on the GQL operation type.
createNhostGraphQLClient(NhostClientBase nhostClient, {GraphQLCache? gqlCache, Map<String, String>? defaultHeaders, Client? httpClientOverride}) → GraphQLClient
Constructs a GQL client for accessing Nhost.io's backend.
createNhostGraphQLClientForAuth(String nhostGqlEndpointUrl, HasuraAuthClient nhostAuth, {GraphQLCache? gqlCache, Map<String, String>? defaultHeaders, Client? httpClientOverride}) → GraphQLClient
Constructs a GQL client for accessing Nhost.io's backend.
httpLinkForNhost(String nhostGqlEndpointUrl, HasuraAuthClient nhostAuth, {Client? httpClientOverride, Map<String, String>? defaultHeaders = const {}}) → Link
Creates an HTTP link that configures automatically based on nhostAuth's authentication state.
webSocketLinkForNhost(String nhostGqlEndpointUrl, HasuraAuthClient nhostAuth, {Map<String, String>? defaultHeaders = const {}, ChannelGenerator? testChannelGenerator, Duration? testInactivityTimeout, Duration testReconnectTimeout = const Duration(seconds: 3)}) → Link
Creates a web socket link that configures (and reconfigures) automatically based on nhostAuth's authentication state.