You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
result.headers.forEach(({ name, value }) =>res.setHeader(name, value));
70
+
res.status(result.status);
71
+
res.json(result.payload);
72
+
} else {
73
+
// graphql-helix also supports subscriptions and incremental delivery (i.e. @defer and @stream directives)
74
+
// out of the box. See the repo for more complete examples that also implement those features.
75
+
}
76
+
}
77
+
});
78
+
79
+
app.listen(4000, () =>
80
+
console.log('Now browse to http://localhost:4000/graphql');
81
+
)
82
+
```
83
+
84
+
This example uses Express, but GraphQL Helix is framework- and runtime-agnostic -- it can run in Node, Deno and the browser. GraphQL Helix provides you with a handful of utility functions to build your own HTTP server but leaves the ultimate implementation details up to you.
0 commit comments