From 21b8de1ba21716a2e86ef7011fffd941fd78c70e Mon Sep 17 00:00:00 2001 From: harshtech123 <139060630+harshtech123@users.noreply.github.com> Date: Mon, 12 Aug 2024 22:23:42 +0530 Subject: [PATCH] feat(2671): Move retry logic from infer_type_name to wizard /claim #2671 --- .../configs/yaml-recursive-input.yaml | 6 +- tailcall-wasm/example/browser/index.html | 81 +++++++++---------- 2 files changed, 43 insertions(+), 44 deletions(-) diff --git a/tailcall-fixtures/fixtures/configs/yaml-recursive-input.yaml b/tailcall-fixtures/fixtures/configs/yaml-recursive-input.yaml index 41448b3fa7..2e847e53f0 100644 --- a/tailcall-fixtures/fixtures/configs/yaml-recursive-input.yaml +++ b/tailcall-fixtures/fixtures/configs/yaml-recursive-input.yaml @@ -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 \ No newline at end of file + type: String diff --git a/tailcall-wasm/example/browser/index.html b/tailcall-wasm/example/browser/index.html index a9cacc5cf1..ed07277f43 100644 --- a/tailcall-wasm/example/browser/index.html +++ b/tailcall-wasm/example/browser/index.html @@ -1,48 +1,47 @@ - - - hello-wasm example - - + + + hello-wasm example + + +
+ + + +

+
-
- - - -

-
+ - + 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() + +