Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Expose GraphQL client in TypeScript SDK #7159

Closed
TomChv opened this issue Apr 22, 2024 · 0 comments · Fixed by #7294
Closed

✨ Expose GraphQL client in TypeScript SDK #7159

TomChv opened this issue Apr 22, 2024 · 0 comments · Fixed by #7294
Assignees

Comments

@TomChv
Copy link
Member

TomChv commented Apr 22, 2024

What are you trying to do?

Expose the GraphQL client directory from the dag variable

See https://discord.com/channels/707636530424053791/1230428619755753553

Why is this important to you?

Allow greater flexibility and special use case like calling other module

How are you currently working around this?

Current workaround from this discord message

connect(
  async (client: Client) => {
    await client
      .moduleSource("github.com/shykes/daggerverse/hello")
      .asModule()
      .initialize()
      .serve();
    const res = await (
      await client["_ctx"].connection()
    ).request(gql`
      query {
        hello {
          hello
        }
      }
    `);
    console.log(res);
  },
  { LogOutput: process.stderr },
);
@TomChv TomChv self-assigned this Apr 22, 2024
@TomChv TomChv added the sdk/typescript All about TypeScript sdk label May 6, 2024
TomChv pushed a commit to TomChv/dagger that referenced this issue May 6, 2024
TomChv added a commit that referenced this issue May 7, 2024
vikram-dagger pushed a commit to vikram-dagger/dagger that referenced this issue May 8, 2024
@helderco helderco added the TypeScript SDK label May 11, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants