pub trait SupabaseClientGraphqlExt {
// Required method
fn graphql(&self) -> Result<GraphqlClient, GraphqlError>;
}Expand description
Extension trait to create a GraphqlClient from a SupabaseClient.
§Example
ⓘ
use supabase_client_sdk::prelude::*;
use supabase_client_graphql::SupabaseClientGraphqlExt;
let client = SupabaseClient::new(config)?;
let graphql = client.graphql()?;
let response = graphql.collection("blogCollection")
.select(&["id", "title"])
.first(10)
.execute::<BlogRow>().await?;Required Methods§
Sourcefn graphql(&self) -> Result<GraphqlClient, GraphqlError>
fn graphql(&self) -> Result<GraphqlClient, GraphqlError>
Create a GraphqlClient from the client’s configuration.
Requires supabase_url and supabase_key to be set in the config.