Skip to content
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

Server System #295

Open
jasonkuhrt opened this issue Jan 16, 2020 · 3 comments
Open

Server System #295

jasonkuhrt opened this issue Jan 16, 2020 · 3 comments
Labels
scope/server Related to the server component type/design

Comments

@jasonkuhrt
Copy link
Member

jasonkuhrt commented Jan 16, 2020

What

  • Define a server middleware API
  • Do not re-export another server middleware system
  • Do be open to adaptors that permit bridging with middleware from other frameworks
  • There must be a standard interface, contract, for plugins to write their logic against
  • Do not expose the raw underlying server API to the app
  • Do consider an unsafe raw escape hatch so apps can get access to the underlying server API
  • Maybe the server implementation is adapted to the deployment target, e.g. serverless uses something else than long-lived etc.
  • Can we ignore router for now?
  • Focus on Middleware focused on header and context manipulation, with ability to short circuit

Related

#141
#270
#231
#273
#506

@jasonkuhrt jasonkuhrt changed the title Server middleware Server API Jan 16, 2020
@jasonkuhrt jasonkuhrt pinned this issue Jan 17, 2020
@jasonkuhrt jasonkuhrt changed the title Server API Server system Jan 17, 2020
@jasonkuhrt jasonkuhrt added scope/server Related to the server component type/epic labels Jan 27, 2020
@jasonkuhrt jasonkuhrt unpinned this issue Feb 29, 2020
@jasonkuhrt
Copy link
Member Author

jasonkuhrt commented Mar 20, 2020

We have made some progress on this topic.

  • server should work with graphqljs directly
  • server should be built on top of node http, not express
  • server should have own middleware system
  • server middleware system should have access to the same context resolvers will get and/or schema.addToContext has an api to add context scope to a request without permitting its use as a middleware standin
  • nexus should have a serverless mode, meaning it just exports a request handler that the host platform will call

Links

Combine v8 snapshots + AWS Lambda

@jasonkuhrt jasonkuhrt pinned this issue Mar 26, 2020
@jasonkuhrt jasonkuhrt changed the title Server system Server System Mar 26, 2020
@jasonkuhrt jasonkuhrt unpinned this issue Jun 11, 2020
@Oba-One
Copy link

Oba-One commented Jul 12, 2020

Hi, I love nexus and was wondering the prgress/eta of the feature?
Is there anyway I can assist in testing or exploration?
@jasonkuhrt

Thanks for all your work!

@russell-dot-js
Copy link

I'm definitely interested in your progress with this -- custom runtimes with V8 Snapshots sounds like a huge win (but also sounds like something the AWS Lambda team easily can and probably should do on their own, considering end users are not charged for init time)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope/server Related to the server component type/design
Projects
None yet
Development

No branches or pull requests

3 participants