graphql-helix
graphql-helix copied to clipboard
Consider moving GraphiQL functions to a separate package.
While useful, they may not be necessary for all users. It is notable that almost all of the package size of graphql-helix
seems to come from dist/render-graphiql.js
. While it would be a breaking change, it is relatively straightforward for users to migrate to something like
import {getGraphQLParameters, processRequest} from 'graphql-helix';
import {renderGraphiQL, shouldRenderGraphiQL} from 'graphql-helix-graphiql';
Sounds like a sound idea. We can publish two packages @graphql-helix/core
and @graphql-helix/graphiql
and just export both from graphql-helix
. No breaking changes needed. I'll circle back to this at my earliest convenience.
I personally use Altair -my recommendation: stay light. expressjs is still around because over the releases it became lighter and lighter. You can always add an example for those in love with graphiql.
I personally use Altair -my recommendation: stay light. expressjs is still around because over the releases it became lighter and lighter. You can always add an example for those in love with graphiql.
are you using altair web with helix? if so, can you please show me how to use it? Thanks!
I personally use Altair -my recommendation: stay light. expressjs is still around because over the releases it became lighter and lighter. You can always add an example for those in love with graphiql.
are you using altair web with helix? if so, can you please show me how to use it? Thanks!
You can just configure a POST
handler in your server for Helix, and the configure GET
to server Altair. Then, point Altair to the endpoint your are using for the POST
:)
This is definitely relevant. I updated the build process of the GraphiQL package, it might not do a major effect, but will allow us later to publish it as standalone package easily, instead of serving it along with graphql-helix
package.
updates?
@talentlessguy Wanna help with this?
Currently, we're using graphql-helix
on Cloudflare Workers and it adds around ~1 MB per worker, which is definitely too much.
I'd be happy to help, but I don't know what the missing pieces are, or why the packages can't be released separately as they are right now.
@dan-lee The idea would be to have the graphql-helix
package which depends on @graphql-helix/core
(which includes all functionality except graphiql functions) and on @graphql-helix/graphiql
which has all the functions for handling graphiql.
People that are concerned about bundle size thus can only install @graphql-helix/core
. graphql-helix
will just re-export everything from @graphql-helix/core
and @graphql-helix/graphiql