Skip to content

hackintoshrao/React-Reason-Dgraph-app

 
 

Repository files navigation

ReasonReact and GraphQL blog application powered by Dgraph

Simple blog application using Reason React using the GraphQL API powered by Dgraph.

Running Dgraph GraphQL API

$ git clone https://github.com/hackintoshrao/React-Reason-Dgraph-app.git
$ cd React-Reason-Dgraph-app
$ docker run -it -p 8080:8080 dgraph/standalone:v1.2.0-rc1
$ jq -n --arg schema "$(cat schema.graphql)" '{ query: "mutation updateGQLSchema($sch: String!) { updateGQLSchema(input: { set: { schema: $sch }}) { gqlSchema { schema } } }", variables: { sch: $schema }}' | curl -X POST -H "Content-Type: application/json" http://localhost:8080/admin -d @- | jq -r

Mutations using the GraphQL playground

# Write your query or mutation here
mutation {
  addAuthor(input:[{name: "Karthic", posts: [{title: "Reason React"}]}]){
    author {id}
  }
}

Running the ReasonReact App

Releases

No releases published

Packages

No packages published

Languages

  • Reason 78.1%
  • JavaScript 10.4%
  • HTML 8.9%
  • C++ 2.6%