Bundle `graphql-voyager` in GraphiQL
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 625
- Avg merge
- 5h 23m
- Merged PRs (30d)
- 24
Description
I'm submitting a ...
* [ ] bug report
* [x] feature request
* [ ] question
It is fairly trivial to expose `graphql-voyager` yourself if you are already consuming `postgraphile` as a library. Doing so is roughly as easy as:
```ts
import * as express from 'express';
import { express as voyagerMiddleware } from 'graphql-voyager/middleware';
import { postgraphile } from 'postgraphile';
const app = express();
app.use(postgraphile(PG_POOL, PG_SCHEMA, graphileConfig));
app.use('/voyager', voyagerMiddleware({
endpointUrl: `${graphileConfig.externalUrlBase || ''}/graphql`,
displayOptions: {
hideRoot: true,
skipDeprecated: true,
skipRelay: true,
},
}));
app.listen(PORT, () => {
console.log(`Listening on localhost:${PORT}`);
});
```
It would be nice to have Voyager bundled for a couple reasons, namely:
1. easier for CLI users to explore their schema graphically
1. possibility for tighter integration with our custom GraphiQL interface (i.e. [deep linking](https://github.com/APIs-guru/graphql-voyager/issues/12), which is not yet supported by Voyager)
1. could be loaded at the same `/graphiql` endpoint
Contributor guide
Assessment
This issue has not been assessed yet.