Changelog
All notable changes to this project will be documented in this file.
[unreleased]
Bug Fixes
(ci) Poetry lockfile (#732)
- Fixes poetry lockfile and adds pre-commit hook to prevent issue from happening
Only build xtask once for the tests (#720)
Use the xtask binary to run the tests.
- The change comes with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Summary by CodeRabbit
-
New Features
- Updated platform compatibility to
x86_64-linux
.
- Updated platform compatibility to
-
Added new configuration entry for enhanced versioning and platform support.
-
Improvements
-
Modified test script to use a custom build script for better test management.
These changes improve platform compatibility and streamline the testing process.
Documentation
/docs/concepts/features-overview/
(#725)
/docs/concepts/features-overview/
(#725)- Re-does the feature overview page of the documentation.
Summary by CodeRabbit
-
New Features
-
Added a "Features Roadmap" component to the website, displaying a list of features with details and links.
-
Documentation
-
Updated various guides and reference documents to improve clarity and presentation of code examples.
-
Added new sections for various features such as Typegate, Typegraph, Runtimes, Prisma, Auth, Tooling, and SDK.
-
Bug Fixes
- Corrected a typo in the GraphQL runtimes reference documentation.
-
Refactor
-
Replaced
SDKTabs
andTabItem
components withTGExample
for better code example presentation. -
Adjusted the
MiniQL
component to handle optional properties and default settings.
Features
(mdk) Mdk python (#707)
Mdk for python runtime
Migration notes
None
Summary by CodeRabbit
-
New Features
-
Introduced new functionalities for generating Python code based on configurations, including handling of templates and required objects.
-
Added Python script templates for defining typed functions and structured objects with comprehensive data type handling.
- Enhanced type management and priority handling in utility functions.
-
Documentation
-
Provided detailed summaries and documentation for new functionalities and templates.
-
Refactor
-
Implemented new structures and methods for efficient code generation and type handling.
-
Tests
- Added tests for defining typegraph structures and policies in Python.
-
Chores
-
Updated URLs in the
.ghjk/deno.lock
file to reflect new changes in the codebase.
(mdk,gate) Hostcall (#706)
Introduces a mechanism for wasm materializers to access hostgate functions.
This implements a pretty basic JSON wire interface, a singular
hostcall
function that's exposed to materializers. The only
implemented function on this interface are gql
queries.
This is a stacked PR on top of #687.
MET-473.
- The change come with new or modified tests
Summary by CodeRabbit
-
New Features
-
Added an import statement for
std_url
and a new task for installing WASI adapter related files. -
Introduced new functionalities in the application's runtime to support additional parameters and error handling.
-
Enhancements
-
Improved the application's handling of GraphQL queries with new error types and display methods.
-
Enhanced the WASM runtime build process to target a more appropriate architecture.
-
Bug Fixes
-
Fixed issues in Python and WASM runtime tests to ensure reliability and performance.
-
Documentation
-
Updated internal documentation to reflect new command interfaces and environmental interactions in the application's CLI tools.
-
Refactor
-
Refactored various internal APIs to improve code maintainability and efficiency.
(meta-test) Update t.engine()
impl (#716)
t.engine()
impl (#716)Update the implementation of t.engine()
The change comes with removing the different spin-offs of t.engine
which arose from the previous impl of t.engine incompatibility with
artifact upload protocol. The change will make t.engine
deploy the
artifacts in Artifact Resolution mode by running a shell command to
deploy the typegraph.
...
- remove different versions of
t.engine
- add tg_deploy caller script which imports typegraphs dynamically and deploys them.
- make changes to make
t.engine
run in artifact resolution mode - update existing tests to adhere to the current change
- pass unique different
tempDir
s to all the typegate instances created during test. - add support for authoring multiple typegraphs in a single file in
meta-test
and add multi typegraph tests.
Migration notes
python SDK test typegraphs' function names should be the same with the filename of the typegraph file, for dynamic import compatibility reasons.
Summary by CodeRabbit
-
New Features
-
Introduced a new function
wasm_duplicate
to handle WebAssembly runtimes with specific policies. -
Refactor
-
Renamed and refactored functions and test setups to align with updated test frameworks and improve code clarity.
-
Bug Fixes
-
Added error handling in the
getLocalPath
function to log warnings if linking errors occur. -
Tests
-
Updated test scripts to reflect changes in function calls, imports, and engine instantiation for better test accuracy and reliability.
v0.4.2 - 2024-05-22
Bug Fixes
(release) Fix fat CLI compilation (#730)
-
Fix fat CLI compilation
-
Bump to 0.4.2
-
Bump wasmtime to 21
-
Bump rust to 1.78.0
-
The change comes with new or modified tests
-
Hard-to-understand functions have explanatory comments
-
End-user documentation is updated to reflect the change
v0.4.1 - 2024-05-20
Bug Fixes
(SDK) Artifact upload fails when same file referred multiple times (#715)
- fix the bug where duplicate artifact references causing failure during artifact resolution(typegate) during runtime.
- add sync mode tests for Python and Deno runtime.
- add other edge test cases to artifact upload.
- test for no artifact in typegraph
- test for duplicate artifact reference in the same typegraph
(gate) Improve logging and responses, prepare 0.4.1 (#714)
- Logging before and after each faillible operation
- Runtimes: foreign resolvers
- Always log before reporting error: HTTP response
- Fix error code in artifact_service
- Add
BaseError
class for structured messages in responses
Summary by CodeRabbit
-
New Features
-
Updated Docker image versions and dependency versions to ensure compatibility and stability.
- Added a search functionality to the app.
-
Bug Fixes
-
Enhanced error handling with specific error classes for more detailed error messages.
-
Refactor
-
Replaced generic
Error
instances with specific error classes for better error categorization. -
Refactored error handling in HTTP response functions to use a
BaseError
class. -
Chores
-
Updated version numbers across multiple configuration files to
0.4.1-0
.
Features
Polish documentation and project (#696)
- update the headline, the overviews and many other documentation areas
- upgrades the dependencies.
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Summary by CodeRabbit
-
Bug Fixes
-
Updated Docker image version for the
typegate
service to ensure stability and compatibility. -
Documentation
-
Revised
TAGLINE
for better clarity on supported languages: WASM, Typescript, and Python. -
Updated version declarations for improved consistency and functionality across multiple files.
Miscellaneous Tasks
(docs) Final polish to comparison table. (#709)
some changes to comparison table(docs)
Migration notes
No Migrations Needed
Summary by CodeRabbit
- Documentation
- Introduced a new section on Artifact Tracking Protocol in the architecture documentation, explaining artifact classification and tracking modes in Metatype.
- Updated comparisons documentation with additional platforms, criteria for choosing Metatype, and detailed feature comparison tables.
- Renamed project directory for clarity and consistency in project setup documentation.
- Bug Fixes
- Removed outdated
TODO
comment in installation documentation.
- Removed outdated
Bump to version 0.4.1-0 (#713)
- Bumps version to 0.4.1-0.
- Fixes broken release CI.
- #719
- Adds 20 minutes to test-full timeout.
Summary by CodeRabbit
Summary by CodeRabbit
-
New Features
-
Updated platform support for better compatibility with "x86_64-linux".
-
Bug Fixes
-
Minor version updates across multiple configurations to enhance stability.
-
Chores
-
Updated version numbers from "0.4.0" to "0.4.1-0" across various files and configurations.
-
Refactor
-
Adjusted build and test scripts for improved efficiency and compatibility.
-
Documentation
-
Enhanced internal documentation to reflect version and platform changes.
v0.4.0 - 2024-05-09
Bug Fixes
(ci) Fix broken nighly jobs (#659)
Fixes the broken nightly builds. Look at solved results here.
Motivation and context
Nightly builds were broken due to oversight during the #571 fixes.
Migration notes
No changes required
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(gh-tests) Fix local npm registry config (#692)
Set max log level based on verbose flag (#664)
Fix secret passing (#675)
Website and headline (#691)
Motivation and context
Fix the CSS issue introduced by docusaurus 3.2.0 (https://github.com/facebook/docusaurus/issues/10005). 3.2.1 should fix it but the affected version maybe loaded by dependencies, so we will have to wait a bit more.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Do not override log level when no verbosity flag is present (#694)
Remove log level override by the verbosity flag when no flag is present. It will default to the configured env_logger default level (or env variable).
...
The default log level became "error" after #664, and RUST_LOG
environment variable where ignored.
Migration notes
N/A
Documentation
Start rebranding (#641)
Add reference/programmatic-deployment/
(#686)
reference/programmatic-deployment/
(#686)Add examples for each command (#684)
Improve /tutorials/quick-start
section. (#681)
/tutorials/quick-start
section. (#681)- Improve Layout
- Include a simple project.
- Add the result/outputs to running CLI commands.
- Remove Metatype cloud registration form.
- Separate the CLI commands to separate code blocks
- Add links to references and concepts.
- Add playground.
Motivation and context
Migration notes
No Migration Needed
Checklist
- Test the commands and the examples.
- The change come with new or modified tests
Improve /docs/tutorials/metatype-basics
(#688)
/docs/tutorials/metatype-basics
(#688)Improve /reference/runtimes/
(#676)
/reference/runtimes/
(#676)Improve /guides/external-functions
(#677)
/guides/external-functions
(#677)- Improvements to the
/guides/external-functions
page. - Adds a configuration file for git-town
Motivation and context
N/A
Migration notes
N/A
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Improve docs/reference/types
(#685)
docs/reference/types
(#685)Add a comparison b/n metatype and other similar solutions/products. (#697)
Features
(cli) Long running discovery (#599)
Delegate serialize, deploy, undeploy, unpack work to SDK.
Motivation and context
Remove duplicate logic, thinking of cli as a convenience on top of the SDK.
Migration notes
When meta cli is used, Migration files are unpacked/resolved relative to
the typegraph's path, not the process's workdir
.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(cli) meta gen
(#636)
meta gen
(#636)(cli) Timeout loader process (#693)
(cli,sdk) Codegen command (#661)
(cli,sdk) Better error messages (#689)
(gate) Wasmtime support (#669)
- BREAKING: wasmtime support (#669)
Motivation and context
Enable support for wit and facilitate readiness for the upcoming specs.
Migration notes
#[wasmedge_bindgen]
are replaced by wit bindings.
In the old version we were restricted to#[wasmedge_bindgen]
, which was
only available in Rust and unique to WasmEdge.
#[wasmedge_bindgen]
fn add(a: u32, b: u32) -> u32 {
a + b
}
In the new implementation, wasm modules written in any language that
uses the wit
interface are now natively supported within typegate
.
// wit/example.wit
package example:host;
world host {
export add: func(a: u32, b: u32) -> u32;
}
An implementation (eg. in Rust) may look like this..
// src/lib.rs
wit_bindgen::generate!({ world: "host" });
struct MyLib;
impl Guest for MyLib {
fn add(a: u32, b: u32) -> u32 {
a + b
}
}
export!(MyLib);
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(gate,cli) $DENO_V8_FLAGS
(#647)
$DENO_V8_FLAGS
(#647)Enables the DENO_V8_FLAGS
env var for tuning v8.
Motivation and context
MET-435 or #621
Migration notes
- This just exposes the deno paramter directly. Refer to deno or v8 docs for more details.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(metagen) Metagen mdk rust (#624)
Implements the general framework for metagen including a generator for rust based wasm mat functions modules.
Motivation and context
MET-420
Migration notes
No breaking changes
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(sdk) .tgignore file support (#633)
Motivation and context
Set what files/folders should be ignored when using the custom
expand_path
function in an external .tgignore
file.
.tgignore
will behave similarly to most .ignore files with basic glob
syntax support.
Migration notes
expand_glob
has been renamed to expand_path
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(sdk) Introduce flag for disabling hashing artifacts + move hash to rust (#645)
Motivation and context
The mdk codegen and typegraph mutually depends on each other (typegraph
needs a concrete mdk.wasm for hashing, and for the mdk.wasm to be built,
it needs type generation based on the typegraph)
Add a flag to enable processing a partial typegraph when using meta gen
(partial == no artifact resolution).
Migration notes
get_file_hash
has been moved to core sdk (under the name hash_file
)
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(sdk, gate, cli) Upload protocol poc uploading wasm file for WasmEdge Runtime
for single replica mode (#631)
WasmEdge Runtime
for single replica mode (#631)Upload protocol for wasm files and atrifacts for WasmEdge Runtime
for
single replica mode
Motivation and context
- Upload WasmEdge Runtime artifacts during typegraph deploy
- Access and load WasmEdge Runtime artifacts from the local file system from typegate
Migration notes
No Migrations Needed
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Raw prisma query through the typegate runtime (#634)
Store the typegraph on s3 (#620)
- BREAKING: Store the typegraph on s3 (#620)
Store the typegraph on s3 for multiple instance support mode.
Motivation and context
Reduce Redis data.
Migration notes
Environment variables:
REDIS_URL
has been removed- For multiple instance support, the following variables are required:
SYNC_REDIS_URL
,SYNC_S3_HOST
,SYNC_S3_REGION
,SYNC_S3_BUCKET
,SYNC_S3_ACCESS_KEY
,SYNC_S3_SECRET_KEY
; and the following variables are optional:SYNC_REDIS_PASSWORD
,SYNC_S3_PATH_STYLE
. Otherwise, none of them can be set.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Remove secret definitions through env vars (#666)
- BREAKING: Remove secret definitions through env vars (#666)
Remove the ability to define secrets in the env vars of the typegate.
Secrets can now only be defined in the metatype config file and the
--secret
CLI option.
Motivation and context
- Security
- Better DX
Migration notes
- Metatype config file: On the node configuration, secrets are
defined at
secrets.<tg_name>.key
:
# before
typegates:
dev:
env:
TG_CONSOLE_POSTGRES_CONN: postgresql://postgres:password@localhost:5432/db?schema=console
TG_CONSOLE_BASIC_ADMIN: password
#after
typegates:
dev:
secrets:
console:
POSTGRES_CONN: postgresql://postgres:password@localhost:5432/db?schema=console
BASIC_ADMIN: password
- Secret override option on meta/cli
# before
meta deploy -f my-tg.py --secret TG_CONSOLE_POSTGRES_CONN=postgresql://postgres:password@localhost:5432/db?schema=console
# after
meta deploy -f my-tg.py --secret POSTGRES_CONN=postgresql://postgres:password@localhost:5432/db?schema=console
# or - with the typegraph name
meta deploy -f my-tg.py --secret console:POSTGRES_CONN=postgresql://postgres:password@localhost:5432/db?schema=console
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Add queryPrismaModel in the typegate runtime (#635)
The queryPrismaModel
function on the typegate typegraph queries rows
from a prisma model.
Motivation and context
Console.
Migration notes
N/A
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Upload artifacts to s3 (#638)
Upload artifacts to S3 when sync-mode is enabled
Motivation and context
Sharing artifacts between replicas without including it in the typegraph (and sync through redis)
Migration notes
No changes needed.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Upload PythonRuntime
artifacts and deps (#672)
PythonRuntime
artifacts and deps (#672)Motivation and context
Track artifact/module dependencis for PythonRuntime
Migration notes
python.import(...)
and python.import_(...)
accept an optional parameter deps
that accepts list of dependencies for the python module.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Upload DenoRuntime
artifacts and deps (#674)
DenoRuntime
artifacts and deps (#674)- Track deno runtime artifacts(also dependencies)
- Upload artifacts during deploy to either local(single replica) or shared(s3)
- resolve artifacts(module and deps) upon typegate runtime.
Motivation and context
Persisting deno runtime artifacts to a local/shared storage.
Migration notes
deno.import(...)
and deno.import_(...)
accept an optional parameter
that accepts list of dependencies for the deno/ts module.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Enable batch prisma queries in the typegate runtime (#682)
Artifact removal (#668)
- Add GC: remove artifacts when unreferenced by any deployed typegraph
- Improve resource management: use
AsyncDisposable
andAsyncDisposableStack
- Improve testability (for parallel testing): always read the tmpDir
config from the
Typegate
object
Motivation and context
Migration notes
N/A
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Summary by CodeRabbit
-
New Features
- Enhanced search functionality with the addition of a new search bar.
- Introduced new test configurations to improve script execution.
-
Updated artifact storage documentation to clarify management processes.
- Added new extensions to support improved code commenting.
-
Bug Fixes
-
Removed outdated Deno import mapping settings to streamline development environment setup.
-
Documentation
-
Expanded documentation on artifact tracking and management, including reference counting and garbage collection mechanisms.
-
Refactor
-
Implemented interface changes in
QueryEngine
for better async disposal management. -
Code restructuring in artifact management for enhanced performance and maintainability.
-
Chores
-
Adjusted settings and configurations in the development environment to align with current best practices.
-
Tests
-
Introduced new test cases for artifact upload and management functionalities.
Miscellaneous Tasks
(release) Prepare 0.4.0 (#710)
Bumps version to release 0.4.0.
Summary by CodeRabbit
- New Features
- Updated the software across various components to version 0.4.0, enhancing functionality and potentially introducing new features or fixes.
- Documentation
- Updated version documentation in multiple configuration files to reflect new version 0.4.0.
- Bug Fixes
- Adjusted version constants and dependencies to ensure compatibility and stability with the new software version 0.4.0.
(sdk,gate) Bump wasmtime to 20.0.0 and wit-bindgen to 0.24.0 (#695)
Refactor
(gate) Wasi 0.2 pyrt (#687)
- Rewrites the PythonRuntime host using a
componentize-py
based component. - Leaf through this memo for a mental model.
(libs/xtask,gate) Remove xtask/codegen (#700)
Faster build time
Migration notes
Make sure to sync typegate/src/types.ts
when an update is made on the
typegraph schema.
(sdk,gate) Improve temporal rt (#642)
- BREAKING: improve temporal rt (#642)
Improve the temporal runtime exposing more parameters and adding more tests.
Motivation and context
MET-397. The old implementation was bug-ridden and did not expose necessary params.
Migration notes
API changes to TemporalRuntime
ctor, methods and generated
materializers.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Pass test options in the first parameter (#667)
Pass the test options in the first parameter along with the test name/description.
Motivation and context
Avoid scrolling to the end of the test function to see/update the test options.
Migration notes
N/A
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Testing
Use local npm registry for tests (#646)
Use verdaccio local npm registry for tests:
- The
@typegraph/sdk
package is published to the local npm registry, and can now be consumed like any npm package from Nodejs or Deno.
Motivation and context
...
Migration notes
N/A
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
v0.3.6 - 2024-03-14
Bug Fixes
(gate) RandomRuntime
does not consider enum
, either
, union
variants (#619)
RandomRuntime
does not consider enum
, either
, union
variants (#619)add either, enum, struct and union type support in Random Runtime.
Motivation and context
generating random values for enums, either and union types was failing.
Migration notes
_No Migrations Needed
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(python-wasi) Fix for vm not initialized after consecutive deploy (#617)
Apply from context (#616)
Optimize typegraph size (#618)
- Hash all type data to compare them on the conversion phase in typegraph/core: remove duplicate types from type final typegraph (duplicate: same value for all the fields except for the "random" name/title).
- Skip unreferenced types in
.apply
Motivation and context
Typegraph is too big sometimes.
Migration notes
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Miscellaneous Tasks
Prepare release v0.3.6 (#626)
v0.3.5 - 2024-03-05
Bug Fixes
(cli) Fix for meta-cli deploy
exit with code 0
on failure (#600)
meta-cli deploy
exit with code 0
on failure (#600)fix the issue where meta-cli deploy
command exits with code 0 on
failure.
Motivation and context
bug fix
Migration notes
No changes needed.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(typegate,typegraph) Minor bugs (#596)
Show error message for unregistered type name (#594)
Check and throw the error for the expose
function when called from the
Python SDK.
Motivation and context
We got a finalization failure when there are some unregistered type
referenced with g.ref
.
Migration notes
No changes needed.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Remove injections from prisma output types (#597)
Remove injections from generated output types for prisma operations.
Motivation and context
Generated types fail validations (injection not allowed in output types).
Migration notes
No changes needed.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Esm customizer for typegate deno ext (#606)
Enables v8 snapshots integration for meta typegate
subcommand and the
standalone typegate. Also bumps deno to 1.41.0.
Motivation and context
Re-enable macos-latest cli-compat test job (#608)
Fixes and enables the broken job.
Motivation and context
Job was disabled earlier to mysterious breakages.
Migration notes
No changes required
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Features
(deno/sdk) Native function embedding in typescript (#598)
Add support for function or lambda definition typescript sdk for
deno.func
similarly to how python.from_def
in python sdk works.
Motivation and context
Providing a string is a bit impractical and counter-intuitive espcially when the sdk language matches with runtime's language.
Migration notes
No changes needed.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(sdk) Testing framework integration 2 (#579)
(sdk) From_random injection (#593)
This change includes changes in StringFormats(added some string formats), logic to provide random values for type nodes and tests to validate the changes. The changes are mostly in the typegraph sdk.
Motivation and context
This feature enables the user to inject random values for a field(Type Node) when defining a Typegraph.
Migration notes
No changes needed.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Remove obsolete restrictions on prisma (#592)
Motivation and context
Since v5, where on unique queries exposes all the fields, not just unique fields.
Parameter transformation (#587)
Enable parameter transformation with the .apply()
method.
It has more or less the same logic as .reduce()
with the ability to
flatten the input type.
Motivation and context
This feature enables simpler APIs (input types) on top of runtimes (e.g.: prisma).
Migration notes
No changes needed.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Nested context query (#595)
- BREAKING: Nested context query (#595)
- Revert context flattening
- Enable jsonpath-like key to access nested object fields or array items on the context.
Migration notes
If you access the context directly in your application (through the
token), access to nested fields shall be updated.
E.g. the expression context["profile.id"]
have to turned to
context.profile.id
.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Miscellaneous Tasks
(release) Bump 0.3.5 (#613)
Refactor
(sdk) Move post-processing functions to the typegate (#586)
Make fat meta-cli
the default (#607)
- BREAKING: make fat
meta-cli
the default (#607)
meta-cli
the default (#607)meta-cli
the default (#607)Switch the default meta-cli
release to the fat version (the one that
includes the typegate
subcommand).
Motivation and context
v0.3.4 - 2024-02-10
Bug Fixes
(ci) upload-artifact@v4
migration, cross
compilation for meta + typegate (#571)
upload-artifact@v4
migration, cross
compilation for meta + typegate (#571)The recent update to upload-artifact@v4
has some breaking changes as
described
here.
This PR addresses them. It also fixes the cross-compilation issues with
the meta-cli
job in the release workflow.
Motivation and context
Issue in release workflow.
Migration notes
No changes required.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(ci) Minor typo in release.yml/docker
(#576)
release.yml/docker
(#576)(ci) Missing ts modules from typegate
image (#577)
typegate
image (#577)Adds a check step to the typegate
's Dockerfile
and converts the
.dockerignore
to be a whitelist.
Motivation and context
The image for 0.3.3 has some files missing.
Migration notes
No changes required
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(typegate) Fix tmp
dir issue, bump to 0.3.4 (#583)
tmp
dir issue, bump to 0.3.4 (#583)- Fixes an issue with the prisma migration code being unable to properly
mktmpd
when running in thetypegate
images. - Removes
cross
usage for all but theaarch64-unknown-linux-gnu
target in themeta-cli
release jobs. Deno doesn't like being cross compiled, doesn't like being built by the cross toolchain in general (even for the native target). The consequence of all this is that theaarch64-unknown-linux-gnu
target will temporarily lack thefull
version builds. - This also bumps the version of the 0.3.4 to get the fix out.
Motivation and context
The main TMP_DIR
was not created properly in the typegate
Dockerfile
.
Migration notes
No changes required
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Remove unallowed fields (#569)
Hotfix typo in release.yml
(#580)
release.yml
(#580)Yes, another one lol. This removes the target
param from the release
builder which will default to the last stage of the Dockerfile, the
epoint
stage. I elected to remove the parameter rather than replacing
the value in order to remove one more place future changes will have to
consider. (convention better than configuration the saying goes (i
think)).
Motivation and context
The typegate
images currently have the wrong target and thus the wrong
entrypoint
command.
Migration notes
No changes required
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Documentation
(website) Cleanup (#521)
Describe your change
This mainly shuffles around the existing docs for better structure. Still a lot to be done. The following pages are also empty as I lack the info regarding their topics:
- Architecture
- Query engine
Super open to feedback. Bring up any points that you think should be mentioned on each page and I'll add them.
Getting started guide for the vscode extension (#578)
Features
(sdk) Testing framework integration (#566)
v0.3.3 - 2024-01-31
Bug Fixes
(ci) Bug in typegraph
release job (#545)
typegraph
release job (#545)(ci) Typo in release.yml (#548)
Fix small typo. Surprised act
didn't catch this, it must evaluate
expressions lazily.
(ci) Force/skip push to registries on manual release (#549)
(ci) Typos in release.yml (#550)
Oof, I can't believe I missed these. The publish steps are hard to test
locally with act
so ig they require extra scrutiny.
Motivation and context
Bug on manual dispatch of releasae
wflow.
(ci) Mismatch in location of $AZURE_DEVOPS_TOKEN
(#551)
$AZURE_DEVOPS_TOKEN
(#551)(ci,release) Hack for broken arm64 builds, bump deno to 1.40.1, bump to 0.3.3 (#565)
This provides a temporary fix for the broken build on arm64. The issue's
related to wasm-opt
builds not being availaible for install by
ghjk/cargo-binstall. This PR uses cargo install
directly instead when
in the dockerfile.
It also:
- bumps metatype version to 0.3.3 to ready the next release
- bumps the deno version to 1.40.1 (which comes with some changes)
Motivation and context
Migration notes
No changes required
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(cli) Bad conditionals in loader detection (#559)
- BREAKING: bad conditionals in loader detection (#559)
- Fix bug in js typegraph loader detection.
- FIx bug where the cwd for loader was overridden in
loader_cmd
despite being set inget_loader_cmd
. - Update to latest ghjk
- Refresh
setup
task inwhiz.yaml
Motivation and context
The old conditionals were faulty.
Migration notes
node
andbun
loaders are now run with thecwd
set to the directory of the typegraph as opposed to themetatype.yml
file. This should resolve settings to the nearestpackage.json
despite location.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(cli, typegate) Explicitly import DenoRuntime.import modules from path (#564)
When using the dynamic import
function, if you provide it a raw path
like /foo/bar/baz
and deno detects the current module's loaded from a
remote host, it'll convert it to a http url. Reasonable behavior but it
turned out to be the cause of #560.
This pr fixes this issue along with:
- Puts contents of
main.ts
in a try/catch block for better error logging. - Fixes minor permission bugs with the bundled runtime.
Motivation and context
#560
Migration notes
No changes required
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(oauth2-profiler) Fix OAuth2 profiler params (#562)
Pass the appropriate request URL and headers to the profiler resolver.
Motivation and context
It used the provider url instead of the (typegate) request URL, causing internal queries to fail.
Migration notes
N/A
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(template/node) Update sdk version to 0.3.2 + add deno.static
(#558)
deno.static
(#558)Motivation and context
Sync template examples with latest 0.3.2.
Added missing deno.static
and func.rate(...)
on node.
Migration notes
N/A
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(vscode-extension) Fix publisher name and version (#553)
- Change the publisher name to metatypedev to match the account name on Azure Devops.
- Add dev-tools projects to
dev/lock.yml
for automatic versioning.
Motivation and context
Failure to publish the extension.
- Non-matching version.
Migration notes
Blank
Checklist
-
The change come with new or modified tests(N/A) -
Hard-to-understand functions have explanatory comments(N/A) -
End-user documentation is updated to reflect the change(N/A)
Documentation
(website) Move typegraphs in separate folder + add ts version (#552)
Features
(node) Node fontend missing features (#557)
(prisma) Add support multi-field ids and id on struct (#556)
Adds support for more advanced id fields and unique constraints:
- Multi-field id
- Id on struct (foreign key)
- Multi-field unique constraints
- Unique constraint on struct (foreign key)
Motivation and context
Support these kind of construct:
user = t.struct(
{
"authProvider": t.string().from_context("provider"),
"profileId": t.string().from_context("profile.id"),
# ...
},
config={"id": ["authProvider", "profileId"]},
).rename("User")
project = t.struct(
{
"id": t.uuid(as_id=True, config=["auto"]),
"owner": g.ref("Account"),
"name": t.string(min=3, pattern="^[A-Za-z_-]$"),
},
config={"unique": [["owner", "name"]]}
).rename("Project")
Migration notes
No migration needed.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(typegate) Oauth2 token validation endpoint (#567)
(typegate-rt) Extend typegate runtime (#561)
Extend the typegate runtime with the following queries:
findListQueries
: find all the queries that returns a list oft.struct
.
Motivation and context
Console.
Migration notes
N/A
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(vscode-ext) Logo, README, display name, description (#554)
- Added a better display name and description
- Added logo and README
Flattened context (#555)
Flatten profile fields in the context.
So instead of
{
provider: 'github',
accessToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
refreshToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
refreshAt: 1704717676,
profile: { id: '43663718' },
exp: 1707280877,
iat: 1704688876
}
we would have:
{
provider: 'github',
accessToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
refreshToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
refreshAt: 1704717676,
'profile.id': '43663718',
exp: 1707280877,
iat: 1704688876
}
Motivation and context
It was impossible to get the nested id into a from_context
injection.
Now we can inject .from_context("profile.id")
.
Migration notes
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Refactor
(ci) workflow_dispatch
for release wflow (#546)
workflow_dispatch
for release wflow (#546)- Manual trigger for release wflow
- Adds missing ghjk step for
vscode-extension
release job
Motivation and context
Provides recovery path for when things break.
Migration notes
Doesn't affect end users.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
v0.3.2 - 2024-01-12
Bug Fixes
(ci) Release changelog generation (#542)
Describe your change
Configures the checkout
action step in the workflow that generates the
workflow to clone the full git history.
Motivation and context
The updates to the release workflow that introduce git cliff based changelogs (back in #487) don't appear to be in effect.
Migration notes
No end user changes required.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Fix stage iteration (#540)
Describe your change
- Fix the
iterChildStages
function. It does not yield accurate values in some edge cases. - Update the testing framework to enable planning without executing on
the
GraphQLQuery
object.
Motivation and context
Sibling stages can be falsely registered as children, for example with the following stages:
getUser.id
getUser.identity
getUser.ideas
Migration notes
No migration needed.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments (N/A)
- End-user documentation is updated to reflect the change (N/A)
Features
(lsp) Simple diagnostics (#496)
Describe your change
Adds a simple LSP implementation for diagnostics.
Motivation and context
Better DX, catch potential errors while editing the typegraph module.
Migration notes
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
(sdk/node) Move js deno to node (#539)
Customizable oauth2 profiler (#538)
Describe your change
Enable custom profiler for the std (predefined) Oauth2 providers:
- Default profiler
- No profiler
- Extended default profiler
- Custom profiler
Motivation and context
We may want for example to add the Github login in the profile in addition to the id.
Migration notes
No migration needed.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Limited parallel loads (#537)
Describe your change
Limit the number of parallel loads.
The default max is the number of CPU cores, but it can be set with the
option --max-parallel-loads=N
.
Motivation and context
When we have a high number of typegraphs, the loader processes exhaust the CPU load.
Migration notes
No migration needed.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change
Miscellaneous Tasks
(release) Bump 0.3.2 (#543)
Bump the version of all metatype libs to 0.3.2.
Motivation and context
About to tag the next version.
Migration notes
Change their manifests to point at the new version.
Checklist
- The change come with new or modified tests
- Hard-to-understand functions have explanatory comments
- End-user documentation is updated to reflect the change