Commit Graph

82 Commits

Author SHA1 Message Date
Alejandro Serrano
63e278db7e Fix thingies 2023-01-07 21:26:23 +01:00
Alejandro Serrano
7e65541688
Update to Stackage LTS 18 (#332) 2022-05-12 07:54:09 +02:00
Akshay Mankar
0f4942b1c4 [grpc-client] Handle bidirectional streams correctly (#314)
This is a breaking change: The handler for bidirectional streams is returns two
conduits now, instead of one. This enables the client to correctly tackle the
concurrent nature of the client to server stream and the server to client
stream.

Each response in the server-to-client stream is no longer wrapped in GRpcReply,
any error during parsing the stream is thrown in IO.

Other connection related errors are returned in the result value of the conduit
corresponding to the server-to-client Conduit.

Note: The client didn't and still doesn't handle any errors that the server
might indicate using headers or trailers, e.g. grpc-status or the HTTP status
code. This commit also adds TODO comments to handle these.
2021-06-01 13:32:17 +02:00
Akshay Mankar
5315abd39c [grpc-server] Close bidirectional streaming requests correctly (#312)
Changes:
- Don't cancel the handler when server stream ends, this will allow the handler
to finish.
- Use TMChan instead of TMVar for consuming the server stream, this allows the
handler to indicate that it has finished and there will be no more output being
produced.
2021-06-01 13:31:23 +02:00
Alejandro Serrano
23677d2d18 Multiplex gRPC servers (#309) 2021-05-10 21:20:36 +02:00
Alejandro Serrano
75e7554603 Do not create a loop in bidi gRPC (#306)
Co-authored-by: Flavio Corpa <flavio.corpa@47deg.com>
2021-04-30 16:41:42 +02:00
Alejandro Serrano
e9d55fd6bf Unions in GraphQL (#270) 2021-01-07 14:55:32 +01:00
Flavio Corpa
62f9d155b8 ❄️ Add gitignore.nix to prevent Nix cache invalidation for trivial changes (#265) 2020-11-20 11:15:47 +01:00
Flavio Corpa
f692c90aeb ♻️ Run cabal-fmt and extract library example (#264) 2020-11-20 10:24:15 +01:00
Alejandro Serrano
e8021f8826 Update several versions 2020-11-19 09:04:24 +01:00
Alejandro Serrano
94f0e4e03e Loosen bounds, update dependencies, support LTS-14 (#253) 2020-11-12 13:09:35 +01:00
Alejandro Serrano
b1ce902f96 Add HLint to CI and fix templates (#243) 2020-11-02 09:42:35 +01:00
Alejandro Serrano
fc423dc387 Keep all annotations from .proto files (#222)
Co-authored-by: Flavio Corpa <flavio.corpa@47deg.com>
2020-09-04 14:36:02 +02:00
Alejandro Serrano
cf814cf418 Distributed tracing (#206) 2020-07-20 12:30:27 +02:00
Flavio Corpa
7facbb2a13 Add boundaries to Cabal files 🚀 (#207)
Co-authored-by: Alejandro Serrano <trupill@gmail.com>
2020-07-03 16:58:26 +02:00
Alejandro Serrano
bf00ed67d8 Add parameter to RpcInfo (#205) 2020-06-22 14:24:05 +02:00
Alejandro Serrano
d6ade8e6ed Annotations, information on RPC, and Prometheus (#198) 2020-06-12 17:57:19 +02:00
Alejandro Serrano
c6b67332f2 Various fixes for Avro encoding (#194) 2020-05-26 11:06:45 +02:00
Flavio Corpa
7c8ed6bc87 Add latest version of warp-grpc v0.4.0.1 🕷 (#183) 2020-04-20 15:48:29 +02:00
Flavio Corpa
e399ebff66 Upgrade templates to mu v0.3 🎸 (#181) 2020-04-17 13:01:25 +02:00
Alejandro Serrano
f0cd4fc5bd Add Haddocks for 0.3 and fix problems with new Haddock (#179) 2020-04-17 10:24:52 +02:00
Flavio Corpa
11ae24d8da Use new server API in examples and upgrade deps ⚗️ (#178) 2020-04-15 14:04:54 +02:00
Alejandro Serrano
4a1db4cd35 Missing gRPC instances (thanks @cb372) (#171) 2020-04-02 14:38:50 +02:00
Alejandro Serrano
276d330c00 Packed fields in Protocol Buffers (#170) 2020-04-02 13:45:06 +02:00
Alejandro Serrano
09ae8c19bb Support 'avro' 0.5 (#164)
Co-authored-by: Flavio Corpa <flavio.corpa@47deg.com>
2020-04-01 15:30:22 +02:00
Alejandro Serrano
6a404b477d Use async instead of withAsync, fixes #165 (#168) 2020-03-31 17:12:08 +02:00
Chris Birchall
8eb8947bf1 Fix the documentation for the initGRpc function (#156) 2020-03-24 11:55:04 +01:00
Alejandro Serrano
f9527b9f3c Update to warp-grpc 0.4 and fix multi-servers (#151) 2020-03-23 15:04:32 +01:00
Alejandro Serrano
12da3fb688 Unify examples for Avro, Protobuf and GraphQL (#139) 2020-03-13 10:07:56 +01:00
Alejandro Serrano
7dab092b81 Remove higher-kinded data (#130) 2020-03-09 14:55:22 +01:00
Alejandro Serrano
6bbfce82eb Support default values in GraphQL schemas (#129) 2020-03-06 16:46:39 +01:00
Alejandro Serrano
d91f25f569 Add names to arguments (#126) 2020-03-06 09:12:35 +01:00
Alejandro Serrano
6d772392e8 Don't use optics to access the single service for a gRPC service (#124) 2020-03-05 16:00:01 +01:00
Alejandro Serrano
c1c23326ef New API to support GraphQL resolvers as services (#111)
Co-authored-by: Flavio Corpa <flavio.corpa@47deg.com>
2020-03-05 15:37:05 +01:00
Flavio Corpa
98dfa4ce80 Prefer Avro.Schema over Type (deprecated) (#117) 2020-02-28 12:18:10 +01:00
Flavio Corpa
4444d6d85d Release v0.2 (#113)
* Add shell script to format ALL cabal files with cabal-fmt 🧐
2020-02-27 07:40:30 +01:00
Flavio Corpa
c4075100c4 Update mu-haskell to use avro-parser-haskell-0.1.1 (#112) 2020-02-26 10:29:00 +01:00
Alejandro Serrano
49742382f9 Support for Avro as serialisation layer (#88)
Co-authored-by: Flavio Corpa <flavio.corpa@47deg.com>
2020-02-06 11:39:09 +01:00
Alejandro Serrano
22f7f740a0 Optics for schema and gRPC clients (#102) 2020-02-04 15:31:47 +01:00
Flavio Corpa
4b5f500e53 Allow newer versions of Stack (lts-14.20) 🆕 (#91) 2020-01-23 12:59:44 +01:00
Alejandro Serrano
cadd377f5c Various fixes to make gRPC server work (#84)
* Better capture exceptions in gRPC server
* Require Warp < 3.3
* Adjust template to work correctly
2020-01-16 10:11:38 +01:00
Flavio Corpa
cdca93a338 Fill all cabal files for Hackage! 🚀 (#72) 2020-01-13 11:05:25 +01:00
Alejandro Serrano
ea8e2a0b75 More thorough Haddock documentation (#65)
Closes #62

Co-authored-by: Flavio Corpa <flavio.corpa@47deg.com>
2020-01-07 15:14:21 +01:00
Alejandro Serrano
603462666e Make ghcide happy (#49) 2019-12-19 14:41:57 +01:00
Alejandro Serrano
00af3d6a34 Higher-kinded data and To/FromSchema separation (#41)
Closes #39
2019-12-16 13:46:43 +01:00
Flavio Corpa
45a44a1145 Add persistent client to example 👨🏼‍💻 (#44) 2019-12-16 12:29:13 +01:00
Flavio Corpa
008dc554a3 Implement Persistent example 💾 (#40) 2019-12-13 13:15:18 +01:00
Alejandro Serrano
fbc0693a39 Work on docs (#37)
Fixes #31
Fixes #36

Co-Authored-By: Flavio Corpa <flavio.corpa@47deg.com>
2019-12-10 17:06:36 +01:00
Alejandro Serrano
0ef0f9f7f4 Add support for logging and other transformers (#35)
Fixes #32
2019-12-05 14:03:10 +01:00
Alejandro Serrano
8451e3d670 Separate annotations from core schema type 🖋 (#29) 2019-12-04 12:35:05 +01:00