@typegraph/sdk
Advanced tools
Changelog
v0.3.6 - 2024-03-14
add either, enum, struct and union type support in Random Runtime.
generating random values for enums, either and union types was failing.
_No Migrations Needed
Bug fix for typegate throwing vm not initialized
after reload
Bug fix
No Migrations Needed
Fix type validators for apply from context.
Bug.
N/A
.apply
Typegraph is too big sometimes.
Prepare release v0.3.6
N/A
N/A
Changelog
v0.3.5 - 2024-03-05
fix the issue where meta-cli deploy
command exits with code 0 on failure.
bug fix
No changes needed.
Just a few very minor bugs I'd encountered this week. Tests pending.
Bugs.
No changes required
Check and throw the error for the expose
function when called from the Python
SDK.
We got a finalization failure when there are some unregistered type referenced
with g.ref
.
No changes needed.
Remove injections from generated output types for prisma operations.
Generated types fail validations (injection not allowed in output types).
No changes needed.
Enables v8 snapshots integration for meta typegate
subcommand and the
standalone typegate. Also bumps deno to 1.41.0.
Fixes and enables the broken job.
Job was disabled earlier to mysterious breakages.
No changes required
Add support for function or lambda definition typescript sdk for deno.func
similarly to how python.from_def
in python sdk works.
Providing a string is a bit impractical and counter-intuitive espcially when the sdk language matches with runtime's language.
No changes needed.
Continuation of #566 , focused on prisma runtime.
N/A
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.
This feature enables the user to inject random values for a field(Type Node) when defining a Typegraph.
No changes needed.
<!-- Explain HOW users should update their code when required -->Since v5, where on unique queries exposes all the fields, not just unique fields.
</details> <details > <summary> Parameter transformation (<a href="https://github.com/metatypedev/metatype/pull/587">#587</a>) </summary>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.
This feature enables simpler APIs (input types) on top of runtimes (e.g.: prisma).
No changes needed.
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
.
Ready for release of v0.3.5
Required by console.
No changes required_.
Depends on #579 Compiled wasm
bin size is too large, goal is to reduce it to
~3MB.
N/A
Switch the default meta-cli
release to the fat version (the one that includes
the typegate
subcommand).
Changelog
v0.3.4 - 2024-02-10
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.
Issue in release workflow.
No changes required.
Small typo blocking the job that pushes the images to ghcr.io.
No changes required.
Adds a check step to the typegate
's Dockerfile
and converts the
.dockerignore
to be a whitelist.
The image for 0.3.3 has some files missing.
No changes required
mktmpd
when running in the typegate
images.cross
usage for all but the aarch64-unknown-linux-gnu
target in
the meta-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 the aarch64-unknown-linux-gnu
target will temporarily lack the full
version builds.The main TMP_DIR
was not created properly in the typegate
Dockerfile
.
No changes required
Skip fields with policies in findListQueries
.
Console.
N/A
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)).
The typegate
images currently have the wrong target and thus the wrong
entrypoint
command.
No changes required
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:
Super open to feedback. Bring up any points that you think should be mentioned on each page and I'll add them.
</details> <details > <summary> Getting started guide for the vscode extension (<a href="https://github.com/metatypedev/metatype/pull/578">#578</a>) </summary>Documentation is missing.
No changes needed.
Enable deploying directly from the typegraph instead of always relying on meta-cli.
N/A
Changelog
v0.3.3 - 2024-01-31
jco
output path is wrong.
N/A
Fix small typo. Surprised act
didn't catch this, it must evaluate expressions
lazily.
What it says on the tin can. Also fixes a typo in the vscode-extension
job.
Manual re-release breaks otherwise as seen here.
</details> <details > <summary> (ci) Typos in release.yml (<a href="https://github.com/metatypedev/metatype/pull/550">#550</a>) </summary>Oof, I can't believe I missed these. The publish steps are hard to test locally
with act
so ig they require extra scrutiny.
Bug on manual dispatch of releasae
wflow.
Another minor issue with the release workflow.
Failure in release run here.
</details> <details > <summary> (ci,release) Hack for broken arm64 builds, bump deno to 1.40.1, bump to 0.3.3 (<a href="https://github.com/metatypedev/metatype/pull/565">#565</a>) </summary>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:
No changes required
loader_cmd
despite being
set in get_loader_cmd
.setup
task in whiz.yaml
The old conditionals were faulty.
node
and bun
loaders are now run with the cwd
set to the directory of
the typegraph as opposed to the metatype.yml
file. This should resolve
settings to the nearest package.json
despite location.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:
main.ts
in a try/catch block for better error logging.#560
No changes required
Pass the appropriate request URL and headers to the profiler resolver.
It used the provider url instead of the (typegate) request URL, causing internal queries to fail.
N/A
Sync template examples with latest 0.3.2. Added missing deno.static
and
func.rate(...)
on node.
N/A
dev/lock.yml
for automatic versioning.Failure to publish the extension.
Blank
Better organization + typescript examples.
N/A
Easier translation from python to typescript typegraph.
N/A
Adds support for more advanced id fields and unique constraints:
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")
No migration needed.
Create an oauth2 token validation endpoint: /:tgName/auth/validate
.
Extend the typegate runtime with the following queries:
findListQueries
: find all the queries that returns a list of t.struct
.Console.
N/A
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
}
It was impossible to get the nested id into a from_context
injection. Now we
can inject .from_context("profile.id")
.
vscode-extension
release jobProvides recovery path for when things break.
Doesn't affect end users.
Changelog
v0.3.2 - 2024-01-12
Configures the checkout
action step in the workflow that generates the
workflow to clone the full git history.
The updates to the release workflow that introduce git cliff based changelogs (back in #487) don't appear to be in effect.
No end user changes required.
Fix docusaurus warnings on the website
Solves MET-307
iterChildStages
function. It does not yield accurate values in some
edge cases.GraphQLQuery
object.Sibling stages can be falsely registered as children, for example with the following stages:
getUser.id
getUser.identity
getUser.ideas
No migration needed.
Make the CLI interactive for migration options to development and production databases.
This creates some breaking changes if you use the CLI in a non-interactive way.
Fallback to MemoryRegister
and NoLimiter
if typegate is unable to connect to
Redis.
Enable Redis-Less mode.
Adds a simple LSP implementation for diagnostics.
Better DX, catch potential errors while editing the typegraph module.
create: [ ... ]
and connect: [ ... ]
Solves MET-304
wasmedge_sdk_bindgen
with VmDock
wasmedge_sdk_bindgen
is deprecated, VmDock
replaces it entirely.
Change deno frontend to pure node
Easier integration.
Enable custom profiler for the std (predefined) Oauth2 providers:
We may want for example to add the Github login in the profile in addition to the id.
No migration needed.
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
.
When we have a high number of typegraphs, the loader processes exhaust the CPU load.
No migration needed.
Bump the version of all metatype libs to 0.3.2.
About to tag the next version.
Change their manifests to point at the new version.
This PR merges most of the CI test runs into one and make use of the ghjk
tool
to install most of the dependencies.
Improve tool dependency management.
Replaces the common::get_version
util function with the PKG_VERSION
variables extracted from shadow_rs
.
If you know of any other opportunities where we can replace things from
shadow_rs
, we can add them in this PR as wel..
shadow_rs
makes the old function redundant
Add file upload test using raw fetch and apollo client.
Ensure common uses of upload feature to work.
Changelog
v0.2.4 - 2023-10-25
Fix lock.yml to set WASM_OPT_VERSION in whiz.yaml
</details> <details > <summary> Fix doc typegraphs deployment (<a href="https://github.com/metatypedev/metatype/pull/462">#462</a>) </summary> </details> <details > <summary> Set metatype version to v0.2.4 (<a href="https://github.com/metatypedev/metatype/pull/467">#467</a>) </summary> </details>The PolicyId for the public policy was cached in a class variable in Policy
.
The cache was not valid in a second typegraph defined in the same module.
Changelog
v0.2.3 - 2023-10-19
Solves MET-268 + fixes an edgecase for "weak validation"
</details>Injected fields are skipped when generating types for prisma.
Additional changes:
disconnect
, update
, upsert
, delete
, updateMany
, deleteMany
on
nested reletionships for create/update operations.Changelog
v0.2.2 - 2023-10-11
Changelog
v0.2.0 - 2023-10-04