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

Remove express-graphql #528

Closed
jasonkuhrt opened this issue Mar 23, 2020 · 0 comments · Fixed by #788
Closed

Remove express-graphql #528

jasonkuhrt opened this issue Mar 23, 2020 · 0 comments · Fixed by #788
Labels
scope/server Related to the server component type/refactor Address tech debt, internal incidental complexity

Comments

@jasonkuhrt
Copy link
Member

What

Why

  • we want to move toward ideas laid out in Server System #295
  • we want to be able to support serverless environments
  • this means running without a server in the codebase
  • this means running graphqljs without express
  • this means our current implementation is a blocker

How

  • replace it with direct usage of express and graphqljs
@jasonkuhrt jasonkuhrt added scope/server Related to the server component type/refactor Address tech debt, internal incidental complexity labels Mar 23, 2020
jasonkuhrt pushed a commit that referenced this issue May 6, 2020
progresses #782
closes #528 

#### Implementation Notes

Several deps have been added in this PR. The goal is to move quickly and iterate on our server components. None of the deps are large, even [fp-ts](https://bundlephobia.com/[email protected]).

fp-ts is exciting. It begins our journey into throw-free code!

#### User Notes

This feature will remain undocumented while we make progress on more parts around it.

This feature exposes request handlers on the server component.

```ts
import { server } from 'nexus'

server.handlers.graphql
server.handlers.playground
```

Users can use these to response to requests in a serverless environment.

```ts
import { server } from 'nexus'

export default (req, res) => {
  server.handlers.graphql(req, res)
}
```
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/refactor Address tech debt, internal incidental complexity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant