I know it's a noob question... but how do I use microGraphiql?
@nnance maybe you can answer this question?
also, i would suggest to update README.md to document it properly 馃憤
Yes I too am looking for documentation on the micro server.
Any links or pointers for documentation will be greatly appreciated.
@servermeta @rwatts3 This test file might help you figure it out: https://github.com/apollographql/graphql-server/blob/master/packages/graphql-server-micro/src/microApollo.test.ts
It looks like the following usage should work:
micro(graphqlMicro(options);
Where options is the same kind of object or function you see in the docs for all the other integrations (express, koa, etc.).
I hope this helps! If one of you could help by updating the readme or the docs, that would be A+! :pray:
@helfer is micro supposed to replace the need for express, koa...
Would it allow you to spin up a graphql endpoint inside of an existing application that doesn't use express, koa ... such as nuxt.js or next.js
@rwatts3 micro is a server used to launch a graphql server.
you can use express or micro or koa. As you choose.
It's separated from the frontend
@helfer I'll try to look into it and post an update
I'm having trouble getting it running as well. It doesn't look like it's using any of micro's response writing helpers or returning a Promise to keep micro waiting until the it's done building the response. Specifically, this line should await or return and the .then below should use micro's helper functions for sending json or error messages.
Does this sound right? If so I can put a PR together, but I'm relatively new to micro so I may be missing something.
Here's a PR: #401
I don't really know how the test works, so I didn't fiddle with much there.
I also tossed an example into the README which _should_ work once this change is in.