Comments (4)
Hey @matzero I am creating an example repository soon with a server example. Stay tuned. The TLDR is that you have to parse the post request into query
string and variables
(using https://github.com/sikanhe/reason-graphql/blob/master/src/Graphql_Json.re#L24) and pass it to the schema.
from reason-graphql.
@matzero Just released a (experimental) middleware package for bs-express
. You can check out the usage here: https://github.com/sikanhe/reason-graphql/blob/master/reason-graphql-bs-express/examples/server.re
If you want to run it on your own server implementation you can peek into the package to see how I parsed the request body to feed it to the graphql server execution function.
To make it work you would want to install reason-graphql
and reason-graphql-bs-express
at latest versions.
from reason-graphql.
@sikanhe this is great! Let me take a gander later on this week and I will report back.
from reason-graphql.
We have a more full example now at https://github.com/sikanhe/reason-graphql/tree/master/examples/starwars-api
from reason-graphql.
Related Issues (12)
- Adding a LICENSE file HOT 2
- More examples HOT 1
- Using with Apollo server? Gradual migration path? HOT 1
- Robust error type HOT 2
- Attribution? HOT 4
- Suggestion: remove 'variations' HOT 4
- Change `list` GraphQL type to accept an `array` HOT 3
- Support async via https://github.com/aantron/promise HOT 2
- Support for Subscriptions
- Guide for Using with different IO libraries
- [Question] Can't find GraphqlJsPromise module HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reason-graphql.