Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ updates:
- "*"

- package-ecosystem: "gradle"
directory: "/example/example1"
directory: "/examples/basic-examples"
schedule:
interval: "monthly"
groups:
Expand Down
49 changes: 0 additions & 49 deletions example/README.md

This file was deleted.

Binary file removed example/example1/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
8 changes: 3 additions & 5 deletions example/Makefile → examples/basic-examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
all: build

project_name=example1
project_name=.
openfga_version=latest
language=java

build:
cd "${project_name}" && \
./gradlew -P language=$(language) build
./gradlew -P language=$(language) build

run:
cd "${project_name}" && \
./gradlew -P language=$(language) run
./gradlew -P language=$(language) run

run-openfga:
docker pull docker.io/openfga/openfga:${openfga_version} && \
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ public void run(String apiUrl) throws Exception {
var configuration = new ClientConfiguration()
.apiUrl(apiUrl) // required, e.g. https://api.fga.example
.storeId(System.getenv("FGA_STORE_ID")) // not needed when calling `CreateStore` or `ListStores`
.authorizationModelId(
System.getenv("FGA_MODEL_ID")) // Optional, can be overridden per request
.authorizationModelId(System.getenv("FGA_MODEL_ID")) // Optional, can be overridden per request
.credentials(credentials);
var fgaClient = new OpenFgaClient(configuration);

Expand Down Expand Up @@ -114,8 +113,9 @@ public void run(String apiUrl) throws Exception {
new ClientTupleKey()
.user("user:anne")
.relation("owner")
._object("document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a") // different relation
)),
._object("document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a") // different
// relation
)),
new ClientWriteOptions()
.disableTransactions(true)
.authorizationModelId(authorizationModel.getAuthorizationModelId()))
Expand Down
Loading