package ppx_graphql
Write type-safe GraphQL queries
Install
Authors
Maintainers
Sources
ppx_graphql-0.2.0.tbz
md5=fb3d648d1384c6de5c11fea13c532c21
Description
Given a introspection query response in schema.json
, the expression [%graphql {| query { ... } |} ]
is rewritten to a 3-tuple (query, kvariables, parse)
:
query
(typestring
) 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 ofargx
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 typeYojson.Basic.json -> < ... >
. The shape of the object type corresponds to the returned response.
Published: 03 Apr 2018
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page