Files
Torsten Dittmann 5a5609dc0a feat: 1.6.x sdks
2024-07-03 17:25:40 +02:00

23 lines
577 B
Markdown

import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Graphql;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Graphql graphql = new Graphql(client);
graphql.query(
mapOf( "a" to "b" ), // query
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);