tailcall
tailcall copied to clipboard
feat: publish tailcall WASM build on NPM
Publish tailcall on npm under
@tailcallhq/wasm-browser@tailcallhq/wasm-node
Public API
import {GraphQLExecutor} from '@tailcallhq/tailcall'
// YML, JSON or GraphQL
const jsonConfig = " ... <tailcall config> ... ";
// Use the builder to create the configuration
const builder = new TailcallBuilder().withJSONConfig(jsonConfig).withYMLConfig(ymlConfig);
// Build an instance of Tailcall, resolving configurations
const tailcall = await builder.build();
// Execute queries using the builder.
const query = "query {users {name}}"
await executor.execute({query})
Technical Requirements
- I should be able to install the package via npm
- I should be able to use the package in the browser directly
- I should be able to use the package via node.js
/bounty 300
💎 $300 bounty • Tailcall Inc.
Steps to solve:
- Start working: Comment
/attempt #1038with your implementation plan - Submit work: Create a pull request including
/claim #1038in the PR body to claim the bounty - Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts
🙏 Thank you for contributing to tailcallhq/tailcall! 🧐 Checkout our guidelines before you get started. 💵 More about our bounty program.
| Attempt | Started (GMT+0) | Solution |
|---|---|---|
| 🟢 @ssddOnTop | #1908 |
can i get assigned to this , would love to work on this issue .
✋
Can you explain more about the package @tailcallhq/wasm-browser? It's confusing, according to my understanding, there should be just 1 package published i.e. @tailcallhq/wasm-nodewhich can be used in browser using nodejs. Or is it like we provide a js file (maybe via cdn) which can be used in browsers like
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
<title>hello-wasm example</title>
</head>
<body>
<script type="module">
import init, { GraphQLExecutor } from "path/to/tailcall.js";
init().then(() => {
const config = " ... <tailcall config> ... "; // YML, JSON or GraphQL
const executor = new GraphQLExecutor(config);
const query = "query {users {name}}"
await executor.execute({query})
});
</script>
</body>
</html>
is anyone still working on this? if not, I would like to get assigned
This GraphQLExecutor being exported, do you imagine it being a Rust source code compiled to WASM or being a JS layer that interfaces with the binary @tusharmath?
Yes.
@coderabbitai
waiting for completion of #1153 or should I start without the builder API?
💡 @ssddOnTop submitted a pull request that claims the bounty. You can visit your bounty board to reward.
Action required: Issue inactive for 30 days. Status update or closure in 7 days.
Issue closed after 7 days of inactivity.
💡 @ssddOnTop submitted a pull request that claims the bounty. You can visit your bounty board to reward.
@tusharmath can we have tailcall check also in this?
helpful to check if config is good in the browser.