A type-safe GraphQL client for PureScript (version 10.1.1) that ensures GraphQL queries, arguments, and responses are type-checked against a PureScript representation of the schema. It includes codegen tools to generate PureScript types from a GraphQL schema, reducing manual effort and errors. Compared to alternatives like purescript-graphql-fundeps, this library provides a more ergonomic DSL for constructing queries and supports both Apollo and non-Apollo server features. Release cadence is irregular; last release was 2021.
npm install purescript-graphql-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows a complete minimal application making a typesafe GraphQL query with custom schema definition.
Use 'import GraphQL.Client.Args ((=>>))' and avoid imports from Data.Functor.
Use the codegen tool to keep PureScript schema in sync with GraphQL schema.
Migrate to using fetch or other HTTP library; see docs for browser example.
Use 'mutation_' or 'mutationGql' functions from GraphQL.Client.Mutation.
Use Proxy like `name :: Proxy "name"` and pass `name` in the query, not the string `"name"`.
Ensure the query record structure matches the schema and the schema type is provided as a Proxy to query_.