Skip to content

Commit

Permalink
Prepare 0.2.8 release
Browse files Browse the repository at this point in the history
  • Loading branch information
mhallin committed Oct 31, 2018
1 parent 91411f4 commit 496a4c5
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 26 deletions.
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

## [Unreleased]

## [0.2.8] – 2018–10–31

### Added

* Interface support! With some restrictions, you can now query interface fields
and have them decoded into polymorphic variants, similar to how unions work.
([#56](https://github.com/mhallin/graphql_ppx/pull/56))

### Bugfixes

* `@bsRecord` on inline fragments on unions did not decode the selection into a
record ([#60](https://github.com/mhallin/graphql_ppx/issues/60))
* Type errors from `@bsRecord` are now reported on their correct source location
([#42](https://github.com/mhallin/graphql_ppx/issues/42))

## [0.2.7] – 2018–08–08

### Improvements
Expand Down Expand Up @@ -159,7 +174,8 @@
type
* `@bsVariant` directive added

[Unreleased]: https://github.com/mhallin/graphql_ppx/compare/0.2.7...HEAD
[Unreleased]: https://github.com/mhallin/graphql_ppx/compare/0.2.8...HEAD
[0.2.8]: https://github.com/mhallin/graphql_ppx/compare/0.2.7...0.2.8
[0.2.7]: https://github.com/mhallin/graphql_ppx/compare/0.2.6...0.2.7
[0.2.6]: https://github.com/mhallin/graphql_ppx/compare/0.2.5...0.2.6
[0.2.5]: https://github.com/mhallin/graphql_ppx/compare/0.2.4...0.2.5
Expand Down
40 changes: 16 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,7 @@ let sendQuery = q =>
);
```

# Limitations

This implementation is incomplete. It does *not* support:

* Non-inline fragments of any kind.
* Interfaces.
* All GraphQL validations. It will *not* validate argument types and do other
sanity-checking of the queries. The fact that a query compiles does not mean
that it will pass server-side validation.

# Things that *do* work
# Features

* Objects are converted into `Js.t` objects
* Enums are converted into [polymorphic
Expand All @@ -220,6 +210,21 @@ This implementation is incomplete. It does *not* support:
optional.
* Unions are converted to polymorphic variants, with exhaustiveness checking.
This only works for object types, not for unions containing interfaces.
* Interfaces are also converted into polymorphic variants. Overlapping interface
selections and other more uncommon use cases are not yet supported.
* Basic fragment support

# Limitations

While graphql_ppx covers a large portion of the GraphQL spec, there are still
some unsupported areas:

* Not all GraphQL validations are implemented. It will *not* validate argument
types and do other sanity-checking of the queries. The fact that a query
compiles does not mean that it will pass server-side validation.
* Fragment support is limited and not 100% safe - because graphql_ppx only can
perform local reasoning on queries, you can construct queries with fragments
that are invalid.

## Extra features

Expand Down Expand Up @@ -363,19 +368,6 @@ type resultType = MyQuery.t;
You can pass `-verbose` in `bsconfig.json` to turn on the verbose mode. You can
also use the `Log` module to log into verbose mode.

## Future work

Core GraphQL features that need to be implemented:

- [ ] Inline fragments
- [ ] Fragment spreads
- [ ] Selecting on interfaces
- [X] Selecting on unions
- [X] Input object arguments
- [ ] Query validations (only partially implemented)
- [X] Explicit resolvers for custom scalars


## Experimental: `graphql-tag` replacement

To simplify integration with e.g. Apollo, this PPX can write the query AST
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graphql_ppx",
"version": "0.2.7",
"version": "0.2.8",
"description": "GraphQL PPX rewriter for Bucklescript/ReasonML",
"main": "index.js",
"repository": "https://github.com/mhallin/graphql_ppx",
Expand Down

0 comments on commit 496a4c5

Please sign in to comment.