Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## UNRELEASED

- Fix compatibility with older QueryVariables API [#137](https://github.com/hypermodeAI/functions-as/pull/137)

## 2024-07-15 - Version 0.10.0

- Add functions and example for accessing PostgreSQL [#119](https://github.com/hypermodeAI/functions-as/pull/119)
Expand Down
15 changes: 15 additions & 0 deletions src/assembly/compat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,18 @@ export abstract class connection {
return graphql.execute<TData>(hostName, statement, variables);
}
}

/**
* @deprecated Import `graphql`, and use `graphql.Variables` instead.
*/
export class QueryVariables {
private qv = new graphql.Variables();

public set<T>(name: string, value: T): void {
this.qv.set(name, value);
}

public toJSON(): string {
return this.qv.toJSON();
}
}