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

Bun example not working. Segmentation fault (core dumped) #3156

Closed
talesmgodois opened this issue Dec 28, 2023 · 1 comment
Closed

Bun example not working. Segmentation fault (core dumped) #3156

talesmgodois opened this issue Dec 28, 2023 · 1 comment

Comments

@talesmgodois
Copy link
Contributor

talesmgodois commented Dec 28, 2023

Describe the bug

Basically, running according to the documentation, the code provided will result on a Segmentation fault (core dumped).

Really not sure if we should take care of this here or on bun repo though.

bun run src/bunApp.ts

Your Example Website or App

Not needed

Steps to Reproduce the Bug or Issue

Basically, this should be working, it's too minimum. Also is how it is on the docs, with an small update based on this comment

Just paste this on a typescript file and run it using bun run file.ts:

import { createSchema, createYoga } from "graphql-yoga";

const yoga = createYoga({
  schema: createSchema({
    typeDefs: /* GraphQL */ `
      type Query {
        greetings: String
      }
    `,
    resolvers: {
      Query: {
        greetings: () => "Hello from Yoga in a Bun app!",
      },
    },
  }),
});
const server = Bun.serve({
  fetch: yoga,
});
console.info(
  `Server is running on ${new URL(
    yoga.graphqlEndpoint,
    `http://${server.hostname}:${server.port}`
  )}`
);

Expected behavior

Make the server available with a minimum graphql setup

Screenshots or Videos

No response

Platform

  • OS: Linux Mint
  • Bun: 1.0.20
  • @graphql-yoga/* version(s): 5.1.0
  • Typescript

Additional context

No response

@EmrysMyrddin
Copy link
Collaborator

Hi, it appears this issue is not reproductible today. If you still encounter it, don't hesitate to reopen an issue with a minimal reporduction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants