Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add main branch content for Session 3 #3

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
026cabc
Add initial outline for session 3
MaryamZi Apr 23, 2024
2903f1c
Update descriptions
MaryamZi Apr 23, 2024
5b92fff
Add level 0 - data
MaryamZi Apr 23, 2024
3f5da76
Fix the duplicate
MaryamZi Apr 24, 2024
3a26698
Add level 0 descriptions
MaryamZi Apr 29, 2024
c0bc20c
Update the README file and add queries
MaryamZi Apr 29, 2024
3c5457e
Add level 1 - record as output type
MaryamZi Apr 23, 2024
a893e3d
Add level 1 descriptions and queries
MaryamZi Apr 29, 2024
ae95c1b
Fix level 2 goals
MaryamZi Apr 29, 2024
463b9f3
Add level 2 - object as output type
MaryamZi Apr 24, 2024
20bd891
Fix the duplicate
MaryamZi Apr 24, 2024
12ffede
Add level 2 descriptions and queries
MaryamZi Apr 29, 2024
78d14ef
Add level 3 - add the review and author classes
MaryamZi Apr 24, 2024
fe773e6
Add level 3 description
MaryamZi Apr 29, 2024
e3d7ca8
Add level 4 - add review mutation
MaryamZi Apr 24, 2024
ea71224
Add level 4 description
MaryamZi Apr 29, 2024
5466f5d
Add level 5 - add review subscription
MaryamZi Apr 24, 2024
53ae23c
Add level 5 description
MaryamZi Apr 30, 2024
cad7f8d
Add level 6 - add interface and union example
MaryamZi Apr 24, 2024
b981757
Update data and add level 6 description
MaryamZi Apr 30, 2024
5ac4d74
Add level 7 - GraphQL client and tests
MaryamZi Apr 24, 2024
89ae481
Update data and add level 7 description
MaryamZi Apr 30, 2024
6a7a7c7
Include adding persistence in the description
MaryamZi Apr 30, 2024
7e76e65
Add level 8a - caching, data loader, filter, sort, and authz
MaryamZi Apr 26, 2024
7b3e98c
Add level 8b - incorporate persistence
MaryamZi Apr 27, 2024
3822eba
Add level 8c - update the client sample
MaryamZi Apr 27, 2024
29815e8
Fix up code and add description
MaryamZi Apr 30, 2024
4031e7c
Add links to BBEs
MaryamZi May 1, 2024
40bb5c3
Add constraint validation
MaryamZi May 1, 2024
0a2c121
Move schema generation to level 8
MaryamZi May 1, 2024
5ca7f0b
Add level 9a - connectors
MaryamZi Apr 28, 2024
d8da2a6
Add level 9b - diff with generated client
MaryamZi Apr 28, 2024
8d5b751
Add level 9 description
MaryamZi May 1, 2024
94921d2
Add a note on private packages
MaryamZi May 1, 2024
a615669
Fix indentation
MaryamZi May 1, 2024
f284978
Add level 10 - enable observability
MaryamZi Apr 28, 2024
3ffa674
Add level 10 description
MaryamZi May 1, 2024
f94faea
Introduce changes for the main branch/demo with the frontend
MaryamZi May 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
386 changes: 386 additions & 0 deletions session-3/backend/README.md

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions session-3/backend/city_data_client.bal
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import ballerina/http;
import ballerina/io;

final http:Client geoClient = check new ("https://public.opendatasoft.com/api/explore/v2.1/catalog/datasets");

type CityDataResultsItem record {
int population;
string timezone;
};

type CityData record {
int total_count;
CityDataResultsItem[] results;
};

public function main() returns error? {
string city = "Miami";
string country = "United States";

CityData cityData = check geoClient->get(
string `/geonames-all-cities-with-a-population-500/records?refine=name:${
city}&refine=country:${country}`);
io:println(cityData);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"image": "ballerina/ballerina-devcontainer:2201.9.0",
"extensions": ["WSO2.ballerina"],
}
11 changes: 11 additions & 0 deletions session-3/backend/connector/city-data-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ballerina generates this directory during the compilation of a package.
# It contains compiler-generated artifacts and the final executable if this is an application package.
target/

# Ballerina maintains the compiler-generated source code here.
# Remove this if you want to commit generated sources.
generated/

# Contains configuration values used during development time.
# See https://ballerina.io/learn/provide-values-to-configurable-variables/ for more details.
Config.toml
8 changes: 8 additions & 0 deletions session-3/backend/connector/city-data-client/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
org = "maryamzi"
name = "city_data_client"
version = "0.1.0"
distribution = "2201.9.0"

[build-options]
observabilityIncluded = true
294 changes: 294 additions & 0 deletions session-3/backend/connector/city-data-client/Dependencies.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,294 @@
# AUTO-GENERATED FILE. DO NOT MODIFY.

# This file is auto-generated by Ballerina for managing dependency versions.
# It should not be modified by hand.

[ballerina]
dependencies-toml-version = "2"
distribution-version = "2201.9.0"

[[package]]
org = "ballerina"
name = "auth"
version = "2.11.0"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.array"},
{org = "ballerina", name = "lang.string"},
{org = "ballerina", name = "log"}
]

[[package]]
org = "ballerina"
name = "cache"
version = "3.8.0"
dependencies = [
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "task"},
{org = "ballerina", name = "time"}
]

[[package]]
org = "ballerina"
name = "constraint"
version = "1.5.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "crypto"
version = "2.7.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
]

[[package]]
org = "ballerina"
name = "file"
version = "1.9.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "os"},
{org = "ballerina", name = "time"}
]

[[package]]
org = "ballerina"
name = "http"
version = "2.11.0"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "file"},
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "jwt"},
{org = "ballerina", name = "lang.array"},
{org = "ballerina", name = "lang.decimal"},
{org = "ballerina", name = "lang.int"},
{org = "ballerina", name = "lang.regexp"},
{org = "ballerina", name = "lang.runtime"},
{org = "ballerina", name = "lang.string"},
{org = "ballerina", name = "lang.value"},
{org = "ballerina", name = "log"},
{org = "ballerina", name = "mime"},
{org = "ballerina", name = "oauth2"},
{org = "ballerina", name = "observe"},
{org = "ballerina", name = "time"},
{org = "ballerina", name = "url"}
]
modules = [
{org = "ballerina", packageName = "http", moduleName = "http"},
{org = "ballerina", packageName = "http", moduleName = "http.httpscerr"}
]

[[package]]
org = "ballerina"
name = "io"
version = "1.6.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.value"}
]

[[package]]
org = "ballerina"
name = "jballerina.java"
version = "0.0.0"

[[package]]
org = "ballerina"
name = "jwt"
version = "2.11.0"
dependencies = [
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.int"},
{org = "ballerina", name = "lang.string"},
{org = "ballerina", name = "log"},
{org = "ballerina", name = "time"}
]

[[package]]
org = "ballerina"
name = "lang.__internal"
version = "0.0.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.object"}
]

[[package]]
org = "ballerina"
name = "lang.array"
version = "0.0.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.__internal"}
]

[[package]]
org = "ballerina"
name = "lang.decimal"
version = "0.0.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "lang.int"
version = "0.0.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.__internal"},
{org = "ballerina", name = "lang.object"}
]

[[package]]
org = "ballerina"
name = "lang.object"
version = "0.0.0"

[[package]]
org = "ballerina"
name = "lang.regexp"
version = "0.0.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "lang.runtime"
version = "0.0.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "lang.string"
version = "0.0.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.regexp"}
]

[[package]]
org = "ballerina"
name = "lang.value"
version = "0.0.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "log"
version = "2.9.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.value"},
{org = "ballerina", name = "observe"}
]

[[package]]
org = "ballerina"
name = "mime"
version = "2.9.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.int"}
]

[[package]]
org = "ballerina"
name = "oauth2"
version = "2.11.0"
dependencies = [
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "log"},
{org = "ballerina", name = "time"},
{org = "ballerina", name = "url"}
]

[[package]]
org = "ballerina"
name = "observe"
version = "1.2.3"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "os"
version = "1.8.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "task"
version = "2.5.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
]

[[package]]
org = "ballerina"
name = "time"
version = "2.4.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "url"
version = "2.4.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerinai"
name = "observe"
version = "0.0.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "observe"}
]
modules = [
{org = "ballerinai", packageName = "observe", moduleName = "observe"}
]

[[package]]
org = "maryamzi"
name = "city_data_client"
version = "0.1.0"
dependencies = [
{org = "ballerina", name = "http"},
{org = "ballerinai", name = "observe"}
]
modules = [
{org = "maryamzi", packageName = "city_data_client", moduleName = "city_data_client"}
]

3 changes: 3 additions & 0 deletions session-3/backend/connector/city-data-client/Package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# City Data Client

Package for city data retrieval from https://public.opendatasoft.com/explore/dataset/geonames-all-cities-with-a-population-500/api/?disjunctive.country.