mercurius-js / mercurius

Implement GraphQL servers and gateways with Fastify
https://mercurius.dev/
MIT License
2.34k stars 234 forks source link

Support nodenext #1056

Closed jonnydgreen closed 9 months ago

jonnydgreen commented 10 months ago

Closes: #1047

type Mercurius = typeof mercurius

declare namespace mercurius {
  // ...

  export const mercurius: Mercurius
  export { mercurius as default }
}

declare module "fastify" {
  // ...
}

declare function mercurius
  (
    instance: FastifyInstance,
    opts: mercurius.MercuriusOptions
  ): void;

export = mercurius;
jonnydgreen commented 10 months ago

Opening an early PR to get your initial thoughts! Essentially, it's just a lift and shift - but keen to get feedback :)

jonnydgreen commented 10 months ago

Cool - thanks! Just ran some final testing and all good to go :)