-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request ] - Pylon without web server. #50
Comments
Hi @ShanonJackson! Thank you for your interesting request. I need to give this deeper thought to determine how a more "general" approach would be feasible, considering Pylon aims to be a framework that simplifies development rather than a universal library for all frameworks. Here's what I can say for now:
Could you elaborate on how this would fix issue #9? |
for #9
and via spread to override a specific resource without rewriting the whole graphql constant.
This way you can create new versions of specific resources and/or entire new graphql schemas using whatever version system you desire. I.E standard api numerical based versioning or by date. Obivously above syntax requires outputting
For this yes, the intention was to I.E
Can you show me the syntax for this? |
import {app} from '@getcronit/pylon'
export const graphql = {
Query: {
test: () => 'Hello, world!'
}
}
export default app
const server = Bun.serve({
fetch: app.fetch,
port: 4000,
idleTimeout: 120
})
console.log(`Server running at ${server.url}`) |
#9 is not just about configuring date based routes, but rather automatic backwards compatible versioning handled by Pylon. Related to #8. So for example when you release a API with a a |
Hi @ShanonJackson. I just released a new feature that allows setting up the graphql routes manually. This is mainly used for dependency mocking during test, but is also the first step to be more framework agnostic. https://pylon.cronit.io/docs/guides/testing#optional-mocking-dependencies |
Is your feature request related to a problem? Please describe.
Would love access to opportunity to use pylon in a way that still allows me native control of the underlying http server.
This has the following advantages:
dev
I.EThe summary of above is it would provide people to separate "pylon" from the underlying "runtime" and "web framework" allowing more flexibility to developers.
Issues and simplifications
This syntax would potentially need to expose a type of a function that matches the app.fetch signature from Hono. I see this though as an improvement because it would allow people to create different adapters for different web frameworks.
I.E
Which leaves room for express/elysia/node/etc adapters.
Adapters would setup a AsyncLocalStorage context, allowing developers to set
getContext
and potential to use that (request storage context) for other properties/state I.E tracing etc.resloves
#9
#21 (because can leverage existing auth strategy's in underlying web framework)
The text was updated successfully, but these errors were encountered: