All Projects â†’ hendrikniemann â†’ Purescript Graphql

hendrikniemann / Purescript Graphql

Licence: mit
End to End typesafe GraphQL with PureScript

Programming Languages

purescript
368 projects

Projects that are alternatives of or similar to Purescript Graphql

Graphql Music
ðŸŽļA workshop in building a GraphQL API
Stars: ✭ 33 (-58.23%)
Mutual labels:  api, graphql
Rest Layer
REST Layer, Go (golang) REST API framework
Stars: ✭ 1,068 (+1251.9%)
Mutual labels:  api, graphql
Graphql Lodash
🛠 Data manipulation for GraphQL queries with lodash syntax
Stars: ✭ 1,003 (+1169.62%)
Mutual labels:  api, graphql
Hoppscotch
ðŸ‘― Open source API development ecosystem https://hoppscotch.io
Stars: ✭ 34,569 (+43658.23%)
Mutual labels:  api, graphql
Requent
A GraphQL like interface to map a request to eloquent query with data transformation for Laravel.
Stars: ✭ 78 (-1.27%)
Mutual labels:  api, graphql
Django Graph Api
Pythonic implementation of the GraphQL specification for the Django Web Framework.
Stars: ✭ 29 (-63.29%)
Mutual labels:  api, graphql
Graphql Inspector
ðŸ•ĩïļâ€â™€ïļ Validate schema, get schema change notifications, validate operations, find breaking changes, look for similar types, schema coverage
Stars: ✭ 1,059 (+1240.51%)
Mutual labels:  api, graphql
Api Platform
Create REST and GraphQL APIs, scaffold Jamstack webapps, stream changes in real-time.
Stars: ✭ 7,144 (+8943.04%)
Mutual labels:  api, graphql
Best Of Web Python
🏆 A ranked list of awesome python libraries for web development. Updated weekly.
Stars: ✭ 1,118 (+1315.19%)
Mutual labels:  api, graphql
Up
Up focuses on deploying "vanilla" HTTP servers so there's nothing new to learn, just develop with your favorite existing frameworks such as Express, Koa, Django, Golang net/http or others.
Stars: ✭ 8,439 (+10582.28%)
Mutual labels:  api, graphql
Osrs.me
A comprehensive dataset for OldSchool Runescape.
Stars: ✭ 13 (-83.54%)
Mutual labels:  api, graphql
Graphql Server
This is the core package for using GraphQL in a custom server easily
Stars: ✭ 65 (-17.72%)
Mutual labels:  api, graphql
Api Example
WIP: Just sample app with API
Stars: ✭ 12 (-84.81%)
Mutual labels:  api, graphql
Nextjs Graphql Sample
A simple app to demonstrate basic API functions built with REST and GraphQL
Stars: ✭ 29 (-63.29%)
Mutual labels:  api, graphql
Ezplatform Graphql
GraphQL server for eZ Platform, the open source Symfony CMS.
Stars: ✭ 27 (-65.82%)
Mutual labels:  api, graphql
Omdb Graphql Wrapper
🚀 GraphQL wrapper for the OMDb API
Stars: ✭ 45 (-43.04%)
Mutual labels:  api, graphql
Just Api
ðŸ’Ĩ Test REST, GraphQL APIs
Stars: ✭ 768 (+872.15%)
Mutual labels:  api, graphql
Graphiti
Stylish Graph APIs
Stars: ✭ 783 (+891.14%)
Mutual labels:  api, graphql
Wertik Js
💊 A library that powers your app with GraphQL + Rest API
Stars: ✭ 56 (-29.11%)
Mutual labels:  api, graphql
Android Okgraphql
Reactive GraphQl client for Android
Stars: ✭ 64 (-18.99%)
Mutual labels:  api, graphql

Purescript GraphQL

License

PureScript GraphQL is a GraphQL implementation written in PureScript. It features a powerful DSL that makes building GraphQL servers as typesafe as possible.

🚧 Full rewrite happening 🚧

This is a complete rewrite of PureScript GraphQL. If you are looking for version 1 of PureScript GraphQL make sure to check out the 1.0.2 tag.

To follow the roadmap to version 2 check out the milestone

Getting started

If you are new to PureScript GraphQL I highly recommend to follow the tutorial. If you know what you are doing you can simply install purescript-graphql with spago. (Not in the package set yet, will be done as soon as beta is out)

spago install graphql

Basic example

This code creates a simple schema with one query field. The field takes one argument name and returns a string.

module Main where

import Prelude

import Data.Argonaut (stringify)
import Data.Map as Map
import Data.Symbol (SProxy(..))
import Effect (Effect)
import Effect.Console as Console
import GraphQL ((!>), (.>), (:>), (?>), graphql)
import GraphQL as GraphQL

main :: Effect Unit
main = do
  result <- graphql schema """{ hello(name: "world") }""" Map.empty Nothing unit
  Console.log $ stringify result -- {"data":{"hello":"world"}}

schema :: GraphQL.Schema Effect Unit
schema = GraphQL.Schema { query: queryType, mutation: Nothing }

queryType :: GraphQL.ObjectType Effect Unit
queryType =
  GraphQL.objectType "Query"
    .> "The root query type."
    :> GraphQL.field "hello" GraphQL.string
      ?> GraphQL.arg GraphQL.string (SProxy :: SProxy "name")
      .> "A simple field that returns a greeting."
      !> (\{ name } _ -> pure $ "Hello, " <> name <> "!")
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].