Skip to content

Commit

Permalink
feat(2671): Move retry logic from infer_type_name to wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
harshtech123 committed Aug 12, 2024
1 parent 762a66c commit 21b8de1
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 44 deletions.
6 changes: 3 additions & 3 deletions tailcall-fixtures/fixtures/configs/yaml-recursive-input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ types:
type: Bar
graphql:
args:
- key: baz
value: '{{.args.baz}}'
- key: baz
value: "{{.args.baz}}"
baseURL: http://localhost
name: bars
Foo:
fields:
name:
type: String
type: String
81 changes: 40 additions & 41 deletions tailcall-wasm/example/browser/index.html
Original file line number Diff line number Diff line change
@@ -1,48 +1,47 @@
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
<title>hello-wasm example</title>
</head>
<body>
<head>
<meta charset="utf-8" />
<title>hello-wasm example</title>
</head>
<body>
<div id="content">
<!-- Adding input field and button -->
<label for="queryInput"></label><input type="text" id="queryInput" placeholder="Enter your query here" />
<button id="btn">Run Query</button>
<p id="result"></p>
</div>

<div id="content">
<!-- Adding input field and button -->
<label for="queryInput"></label><input type="text" id="queryInput" placeholder="Enter your query here" />
<button id="btn">Run Query</button>
<p id="result"></p>
</div>
<script type="module">
import init, {TailcallBuilder} from "../../browser/pkg/tailcall_wasm.js"
await init()

<script type="module">
import init, { TailcallBuilder } from "../../browser/pkg/tailcall_wasm.js";
await init();
let executor // Making executor accessible

let executor; // Making executor accessible
async function setup() {
try {
const urlParams = new URLSearchParams(window.location.search)
let schemaUrl = urlParams.get("config")

async function setup() {
try {
const urlParams = new URLSearchParams(window.location.search);
let schemaUrl = urlParams.get("config");

let builder = new TailcallBuilder();
builder = await builder.with_config(schemaUrl);
executor = await builder.build();
let btn = document.getElementById("btn");
btn.addEventListener("click", runQuery);
} catch (error) {
alert("error: " + error);
}
}
async function runQuery() {
let query = document.getElementById("queryInput").value;
try {
document.getElementById("result").textContent = await executor.execute(query);
} catch (error) {
console.error("Error executing query: " + error);
document.getElementById("result").textContent = "Error: " + error;
}
}
setup();
</script>
</body>
let builder = new TailcallBuilder()
builder = await builder.with_config(schemaUrl)
executor = await builder.build()
let btn = document.getElementById("btn")
btn.addEventListener("click", runQuery)
} catch (error) {
alert("error: " + error)
}
}
async function runQuery() {
let query = document.getElementById("queryInput").value
try {
document.getElementById("result").textContent = await executor.execute(query)
} catch (error) {
console.error("Error executing query: " + error)
document.getElementById("result").textContent = "Error: " + error
}
}
setup()
</script>
</body>
</html>

0 comments on commit 21b8de1

Please sign in to comment.