Nim implementation of GraphQL with sugar and steroids
Go to file
Etan Kissling 54dcec7f6f
Specify `maxResponseHeadersSize` when initializing HTTP client (#126)
* Specify `maxResponseHeadersSize` when initializing HTTP client

Update to be compatible with newer Chronos versions that have an
additional argument when instantiating `HttpClientRequestRef`.

* Specify max header size implicitly to remain compatible with old Chronos
2024-05-14 09:16:27 +07:00
.github/workflows Upgrade github actions to v4 2024-01-27 17:00:58 +07:00
docs update docs related to deprecation 2022-03-11 23:45:56 +07:00
fuzzer
graphql Specify `maxResponseHeadersSize` when initializing HTTP client (#126) 2024-05-14 09:16:27 +07:00
playground Add push raises 2024-01-01 19:32:28 +07:00
resources
tests Http server use async raises (#123) 2024-01-27 20:19:36 +07:00
.gitignore add nim 2.0 to ci matrix 2023-04-17 10:39:44 +07:00
Dockerfile playground: add support to run inside docker 2021-07-04 11:41:08 +07:00
LICENSE-APACHEv2
LICENSE-MIT
README.md playground: add support to run inside docker 2021-07-04 11:41:08 +07:00
config.nims adjustment for nim 1.6 2023-01-31 17:28:41 +07:00
graphql.nim
graphql.nimble test refc in CI in Nim 2.0 and later (#125) 2024-02-19 16:06:18 +00:00

README.md

nim-graphql

GraphQL Logo

License: Apache License: MIT Github action

Introduction

Enjoy writing graphql service in plain Nim!. You decide when to use more syntactic sugars offered by Nim templates. And you can choose whether you want to use macros or not, we don't impose them to you.

Designed from ground up to be easily tested part by part, you can quickly implement your service while writing a comprehensive test suite for it.

You can choose which transport mechanism to deliver your service. Over http or secure-http, websocket or secure-websocket, ipc or rpc, rawsocket, and OS stdin/stdout. Not all of these mechanisms provided by nim-graphql, but the freedom is there.

Documentation

If you are interested in contributing to nim-graphql development, the official specification is here.

If you want to know how to use nim-graphql or how nim-graphql works, the documentation is available here.

Playground

You can play with our playground graphql http server using graphql client such as Altair GraphQL client or using builtin graphiql user interface.

  • Using Starwars schema/api.
$ nimble starwars

or

$ nim c -r playground/swserver starwars
  • Using Ethereum schema/api.
$ nimble ethereum

or

$ nim c -r playground/swserver ethereum

To run the playground server with docker, you can execute this commands:

$ docker build -t graphql .
$ docker run -p 8547:8547 -t graphql

The server is accessible at this address http://127.0.0.1:8547/graphql and the web user interface at http://127.0.0.1:8547/graphql/ui.

Installation

You can use Nim's official package manager Nimble to install nim-graphql:

$ nimble install https://github.com/status-im/nim-graphql.git

or

$ nimble install graphql

Contributing

When submitting pull requests, please add test cases for any new features or fixes and make sure nimble test is still able to execute the entire test suite successfully.

License

Licensed and distributed under either of

or

at your option. These files may not be copied, modified, or distributed except according to those terms.