I’m still working on a GraphQL implementation for Haskell.
I want it to be a complete implementation of the GraphQL specification. But of course it is not so far yet.
As I mentioned before the library (I will call it just “graphql” in the text) wasn’t written by me originally, but I happend to be the one who maintains it now. I would like to tell a bit what has been achieved this year and how it is going.
I replaced many internals. The original implementation was pretty simple, used many lists and “data functions” (for example something that should be a
HashMap was defined as
Text -> Maybe Value and this function was passed around). These were rewritten with data structures that represent, well, the structure of the data better and more natural.
The library still hasn’t one big and important feature, which is the main point of GraphQL: Validation. But I slowly get to the point where I can start to implement it. I’m already writing the parser for the Schema Definition Language. So next year this will be the main component I’m going to work on.
Till now I implemented the features, I’m aware of, in the query executor (all kinds of fragments and directives) and some other things:
- Directives (@include and @skip)
- Fragments and inline fragments
- Prettifier (Parsed queries can be printed again minified or prettiefied)
- Query parser can be used independently
- Various small bugs were fixed as well
Many Haskell libraries have terrible documentation, don’t they? Well graphql doesn’t have a lot of useful documentation. I thought first: well, it is still work in progress, it is not that important on this stage. But after listening to some youtube talks I got ashamed, so I’ll provide more “getting started” docs at the beginning of the coming year.
Breaking changes and sometimes big breaking changes are still to be expected. Unfortunately I can’t guarantee great backward compatibility until we reach 184.108.40.206.
I had first issues and pull requests and I’m very happy about it. It makes the work much more enjoyable, knowing that it is probably useful for someone else. I appreciate every issue and every pull request.
And as childish as I am, if you like the library, give it a star.
And if you have any questions, feel free to ask.