mercurius-js / mercurius

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

fastify-cli and Mercurius #975

Open lsanwick opened 1 year ago

lsanwick commented 1 year ago

I'm trying to use fastify-cli to run a new Mercurius server and the docs are suprisingly unclear on how to run a newly created server without an explicit app.listen call.

Can anyone illuminate me on how to properly fastify start a server after registering the mercurius plugin?

ChristoPy commented 1 year ago

Hi, I've ran into the same question this week.

Look at this repo:

https://github.com/ChristoPy/woovi-challenge/tree/main/api

It was not only bootstrapped with fastify CLI but also has mercurius configured

ChristoPy commented 1 year ago

(Hope I get the job tough :smile:)