altair icon indicating copy to clipboard operation
altair copied to clipboard

Better docs for altair-fastify-plugin

Open jcollum-nutrien opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. The readme for altair-fastify-plugin could use more depth.

Describe the solution you'd like For instance:

app.register(AltairFastify, {
  /**
   * All these are the defaults.
   */
  path: '/altair',
  baseURL: '/altair/',
  endpointURL: '/graphql',
});

Why is path and baseURL the same path? What is the endpointURL for? If I start a server with these defaults what path do I navigate to to get to the Altair interface?

jcollum-nutrien avatar Apr 28 '22 16:04 jcollum-nutrien

These are documented in the code https://github.com/altair-graphql/altair/blob/master/packages/altair-fastify-plugin/src/index.ts#L8-L25

I'd not want to have the documentation also in the README as that can get out of sync easily. We could consider using a tool to automatically generate the docs from the code, if this is necessary.

imolorhe avatar May 06 '22 19:05 imolorhe

Maybe we could write it down in the Altair Docs integrations page? https://altairgraphql.dev/docs/integrations/

I could do a PR if it is straithg forward enough :)

kamatheuska avatar Jan 23 '23 12:01 kamatheuska

@kamatheuska Feel free to create a PR

imolorhe avatar Jan 24 '23 00:01 imolorhe