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
Copy file name to clipboardExpand all lines: README.md
+72
Original file line number
Diff line number
Diff line change
@@ -725,6 +725,78 @@ console.log('Listening to port 4000');
725
725
726
726
</details>
727
727
728
+
<detailsid="graphql-upload-http">
729
+
<summary><ahref="#graphql-upload-http">🔗</a> Server handler usage with <ahref="https://github.com/jaydenseric/graphql-upload">graphql-upload</a> and <ahref="https://nodejs.org/api/http.html">http</a></summary>
// variables must be an object as per the GraphQL over HTTP spec
747
+
variables:Object(params.variables),
748
+
};
749
+
},
750
+
});
751
+
752
+
constserver=http.createServer((req, res) => {
753
+
if (req.url.startsWith('/graphql')) {
754
+
handler(req, res);
755
+
} else {
756
+
res.writeHead(404).end();
757
+
}
758
+
});
759
+
760
+
server.listen(4000);
761
+
console.log('Listening to port 4000');
762
+
```
763
+
764
+
</details>
765
+
766
+
<detailsid="graphql-upload-express">
767
+
<summary><ahref="#graphql-upload-express">🔗</a> Server handler usage with <ahref="https://github.com/jaydenseric/graphql-upload">graphql-upload</a> and <ahref="https://expressjs.com/">express</a></summary>
0 commit comments