GithubHelp home page GithubHelp logo

How do you use it? about reason-graphql HOT 4 CLOSED

sikanhe avatar sikanhe commented on May 20, 2024
How do you use it?

from reason-graphql.

Comments (4)

sikanhe avatar sikanhe commented on May 20, 2024 1

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.

sikanhe avatar sikanhe commented on May 20, 2024

@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.

matzero avatar matzero commented on May 20, 2024

@sikanhe this is great! Let me take a gander later on this week and I will report back.

from reason-graphql.

sikanhe avatar sikanhe commented on May 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.