r/graphql • u/n1ru4l The Guild • Jul 22 '21
Introducing Envelop: The GraphQL Plugin System
https://the-guild.dev/blog/introducing-envelop4
u/FurCollarCriminal Jul 22 '21
Really great. Had to implement many of these features in every product that I worked on in the past few years, and it was a hassle every time. Something as simple as Sentry integration was finicky. This looks like an elegant solution.
2
u/n1ru4l The Guild Jul 22 '21 edited Jul 23 '21
Thank you for your kind words!
This is just the beginning, although we use many of these plugins already successfully for several months in our customer projects - If you try out envelop and encounter any issues or things that could be improved don't hesitate to create a GitHub issue or hit us up via the chat on all our websites :)
2
u/matthewsilas Jul 22 '21
Congrats on the launch! This looks really exciting.
I'm especially curious about the graphql-jit plugin. Does that plugin play nicely with the datadog APM logger? In the past, I couldn't get it to work because the datadog APM hooked into the vanilla graphql.execute call. How'd you get it to work?
In lieu of a max depth, I've always been curious about implementing a point system like GitHub's GraphQL API. Any plans for something similar?
PS thanks for the section on oneOf! Input unions can't come soon enough.
1
u/n1ru4l The Guild Jul 22 '21
Thank you for expressing your curiosity!
In lieu of a max depth, I've always been curious about implementing a point system like GitHub's GraphQL API. Any plans for something similar?
That sounds like an interesting challenge to solve. I already created an issue for it https://github.com/dotansimha/envelop/issues/464 If you have further thoughts feel free to comment them over there!
PS thanks for the section on oneOf! Input unions can't come soon enough.
Input Unions are a MUST. I cannot imagine developing without them anymore. They are so convenient for modelling complex filters!
I'm especially curious about the graphql-jit plugin. Does that plugin play nicely with the datadog APM logger? In the past, I couldn't get it to work because the datadog APM hooked into the vanilla graphql.execute call. How'd you get it to work?
Could you provide more context? the GraphQLJit plugin is a lightweight wrapper around graphql-jit. Could you share your previous datadog/graphql setup? Would love to dig in and find a proper solution!
1
u/n1ru4l The Guild Jul 23 '21
I started reimplementing the logic from GitHub over here https://github.com/dotansimha/envelop/pull/474
1
u/Omkar_K45 Jul 22 '21
is this similar to GiraphQL or nexus
1
u/n1ru4l The Guild Jul 22 '21
GiraphQL and nexus are code-first schema building libraries.
Envelop is a plugin system for the GraphQL request pipeline.
GiraphQL and nexus can be used together with envelop.
1
8
u/n1ru4l The Guild Jul 22 '21 edited Jul 22 '21
Hey everyone,
The Guild is happy to announce the most significant open-source project we ever launched!
For a while the JavaScript GraphQL Server ecosystem has been stuck and fragmented - it’s time we change that - with a better foundation!
Envelop makes "hard” GraphQL capabilities easy using a powerful plugin system.
Add Caching, Tracing, Logging, Persisted Operations, Security & Auth with a single line of code.
Today you can't share solutions across different servers. Envelop's plugins work with any server or deployment (express/fastify/netlify/vercel/AWS Lambda/Azure Functions/Cloudflare Workers/Google Cloud Functions) and any schema builder!
Framework for Frameworks - Envelop can become the new basis for GraphQL Frameworks. We collaborated closely together with the RedwoodJS team to migrate their existing GraphQL server setup to a more extensible setup powered by envelop and helix, learn more here: https://community.redwoodjs.com/t/using-graphql-envelop-helix-in-redwood-v0-35/2276
You can use any modern GraphQL Features (@defer/@stream/@live queries, oneOf, and any other open RFC spec) today, even if graphql-js has not yet been implemented or released!
All of us in the GraphQL eco-system deserve a server that is performant, modern, secure, and flexible.
Like everything The Guild is known for - https://envelop.dev will be well maintained for the long term, always up to date, with continuous performance benchmarks and great support!
We are also on ProductHunt and would appreciate your upvotes :) https://www.producthunt.com/posts/envelop-3