All Projects → reasonml-community → Graphql Ppx

reasonml-community / Graphql Ppx

Licence: mit
GraphQL language primitives for ReScript/ReasonML written in ReasonML

Programming Languages

ocaml
1615 projects
reason
219 projects
bucklescript
41 projects

Projects that are alternatives of or similar to Graphql Ppx

Reason Graphql Fullstack
Fullstack Reason + GraphQL Todo List App
Stars: ✭ 246 (+32.97%)
Mutual labels:  graphql, reasonml
Reason Urql
Reason bindings for Formidable's Universal React Query Library, urql.
Stars: ✭ 203 (+9.73%)
Mutual labels:  graphql, reasonml
Reason Graphql
GraphQL server in pure Reason (Bucklescript)
Stars: ✭ 137 (-25.95%)
Mutual labels:  graphql, reasonml
Rescript Relay
Use Relay with ReasonML.
Stars: ✭ 214 (+15.68%)
Mutual labels:  graphql, reasonml
Graphql ppx
GraphQL PPX rewriter for Bucklescript/ReasonML
Stars: ✭ 325 (+75.68%)
Mutual labels:  graphql, reasonml
Learn Graphql
Real world GraphQL tutorials for frontend developers with deadlines!
Stars: ✭ 586 (+216.76%)
Mutual labels:  graphql, reasonml
Reason Apollo Hooks
Deprecated in favor of https://github.com/reasonml-community/graphql-ppx
Stars: ✭ 140 (-24.32%)
Mutual labels:  graphql, reasonml
Apollo Cache Redux
Redux cache for Apollo Client 2.0. This project is no longer maintained.
Stars: ✭ 179 (-3.24%)
Mutual labels:  graphql
Graphql2rest
GraphQL to REST converter: automatically generate a RESTful API from your existing GraphQL API
Stars: ✭ 181 (-2.16%)
Mutual labels:  graphql
Human Connection
Free and open-source social network for active citizenship.
Stars: ✭ 177 (-4.32%)
Mutual labels:  graphql
Felipefialho.com
😺 My personal website
Stars: ✭ 177 (-4.32%)
Mutual labels:  graphql
React Auth App Example
An app example with authentication using Create React App, React, React Router, Apollo, GraphQL, Redux and Redux Form.
Stars: ✭ 179 (-3.24%)
Mutual labels:  graphql
Philip2
An Elm to OCaml compiler
Stars: ✭ 182 (-1.62%)
Mutual labels:  reasonml
Fetchql
GraphQL client with Fetch
Stars: ✭ 178 (-3.78%)
Mutual labels:  graphql
Comunica
📬 A knowledge graph querying framework for JavaScript
Stars: ✭ 183 (-1.08%)
Mutual labels:  graphql
React Apollo Form
Build React forms based on GraphQL APIs.
Stars: ✭ 178 (-3.78%)
Mutual labels:  graphql
Hotchocolate
Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
Stars: ✭ 3,009 (+1526.49%)
Mutual labels:  graphql
Graphql Faker
🎲 Mock or extend your GraphQL API with faked data. No coding required.
Stars: ✭ 2,361 (+1176.22%)
Mutual labels:  graphql
Examples
Examples for GraphQL.NET
Stars: ✭ 179 (-3.24%)
Mutual labels:  graphql
Fullstack Boilerplate
Fullstack boilerplate using Typescript, React, GraphQL
Stars: ✭ 181 (-2.16%)
Mutual labels:  graphql

Logo

Typesafe GraphQL operations and fragments in ReasonML

Build Status npm version

DocumentationFeaturesInstallationUsageRoadmapContributingLicenseAcknowledgements

Documentation

Go to the official documentation

Features

  • Language level GraphQL primitives

  • Building block for GraphQL clients

  • 100% type safe

Installation

Schema

graphql-ppx needs your graphql schema to be available in the form of a graphql_schema.json file.

The easiest way to add this to your project is using an introspection query to your backend. You can do this using get-graphql-schema:

npx get-graphql-schema ENDPOINT_URL -j > graphql_schema.json

With ENDPOINT_URL being the URL of your GraphQL endpoint.

Cache

graphql-ppx will generate a .graphql_ppx_cache folder alongside your JSON schema to optimize parsing performance. If you're using a version control system, you don't need to check it in.

The next pages will provide further installation instructions whether you are using graphql-ppx with Bucklescript or using Reason Native.

Bucklescript

First, add it to you dependencies using npm or yarn:

yarn add @reasonml-community/graphql-ppx --dev
# or
npm install @reasonml-community/graphql-ppx  --saveDev

Second, add it to ppx-flags and bs-dependencies in your bsconfig.json:

"ppx-flags": ["@reasonml-community/graphql-ppx/ppx"],
"bs-dependencies": ["@reasonml-community/graphql-ppx"]

Native

Caution!

The Bucklescript version of graphql-ppx was almost completely rewritten for the 1.0 release, with many improvements and changes. This documentation will focus on the API of the bucklescript version. This means that most of the examples won't apply for the Reason Native version. Please take a look at the old documentation. At the same time we welcome contributions to modernize the Reason Native version of graphql-ppx :::

You need to provide the following dependency in your esy.json file

{
  "dependencies": {
    "graphql-ppx": "*"
  },
  "resolutions": {
    "graphql-ppx": "reasonml-community/graphql-ppx:esy.json#<use latest stable commit from master>"
  }
}

and update your dune file:

(preprocess (pps graphql_ppx))

Usage

Make your first query:

Reason

[%graphql {|
  query UserQuery {
    user {
      id
      name
    }
  }
|}];

ReScript

%graphql(`
  query UserQuery {
    user {
      id
      name
    }
  }
`)

Open getting started in the docs

Roadmap

See our development board for a list of selected features and issues.

Contributing

We'd love your help improving graphql-ppx!

Take a look at our Contributing Guide to get started.

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

Thanks to everyone who contributed to graphql-ppx!

This project builds upon mhallin/graphql_ppx. It wouldn't be possible without great work of mhallin/graphql_ppx contributors. 1

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].