opam-version: "2.0"
maintainer: "Andreas Garnaes <andreas.garnaes@gmail.com>"
authors: "Andreas Garnaes <andreas.garnaes@gmail.com>"
homepage: "https://github.com/andreas/ppx_graphql"
doc: "https://andreas.github.io/ppx_graphql/"
bug-reports: "https://github.com/andreas/ppx_graphql/issues"
dev-repo: "git+https://github.com/andreas/ppx_graphql.git"
build: [
  ["jbuilder" "build" "-p" name "-j" jobs]
  ["jbuilder" "runtest" "-p" name "-j" jobs] {with-test}
]
depends: [
  "ocaml"
  "jbuilder"
  "graphql"
  "yojson"
  "ppx_metaquot"
  "alcotest" {with-test & >= "0.4.5" & < "0.8.0"}
]
synopsis: "Write type-safe GraphQL queries"
description: """
Given a introspection query response in `schema.json`, the expression `[%graphql {| query { ... } |} ]` is rewritten to a 3-tuple `(query, kvariables, parse)`: 

- `query` (type `string`) is the GraphQL query to be submitted.
- `kvariables` (type `(Yojson.Basic.json -> 'a) -> arg1:_ -> ... -> argn:_ -> unit -> 'a`) is a function to construct the JSON value to submit as query variables. The labels and types of `argx` are extracted from the query. Required variables appear as labeled arguments, optional variables appear as optional arguments.
- `parse` is a function for parsing the JSON response from the server and has the type `Yojson.Basic.json -> < ... >`. The shape of the object type corresponds to the returned response."""
url {
  src:
    "https://github.com/andreas/ppx_graphql/releases/download/0.1.0/ppx_graphql-0.1.0.tbz"
  checksum: "md5=867fd458e920f747f5557fdba257ce12"
}
