Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for Elm 0.19 #60

Merged
merged 50 commits into from
Aug 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
0687fac
Run elm-upgrade
xtian May 10, 2018
b1ea14f
Update deps
xtian May 10, 2018
e1077a5
Remove custom infix operators
xtian Aug 12, 2018
524507c
Remove shadowing
xtian Aug 12, 2018
d247133
Use (..) for importing variants
xtian Aug 12, 2018
05039b3
Http: Time -> Float
xtian Aug 12, 2018
0408149
(,) -> Tuple.pair
xtian Aug 12, 2018
6e7a6ff
Http.encodeUri -> Url.percentEncode
xtian Aug 12, 2018
74741a7
Use new Json.Encode API
xtian Aug 12, 2018
8a66a6a
Replace `toString` usage
xtian Aug 12, 2018
4cdc455
Update tests for 0.19
xtian Aug 12, 2018
2862ad6
Debug.crash -> Debug.todo
xtian Aug 12, 2018
4e9a2dc
Generator.Normalize: Use new Regex API
xtian Aug 12, 2018
2cd4137
Don't change type of record fields
xtian Aug 12, 2018
121f0ff
Subscription: Stub WebSocket functions
xtian Aug 12, 2018
e6e97bc
Subscription: Use new Time API
xtian Aug 12, 2018
1aba50d
Subscription: Use new Json.Decode API
xtian Aug 12, 2018
124ca6a
Generator.Normalize.underscores: Handle `leading` and `trailing` as N…
xtian Aug 13, 2018
a200162
Move generator modules to seperate application
xtian Aug 13, 2018
b70e199
Start to upgrade examples and ete_tests apps
xtian Aug 13, 2018
e839d59
package.json: `elm-make` -> `elm make`
xtian Aug 13, 2018
4989981
generator: Fix imports in templates
xtian Aug 13, 2018
54f777d
generator: Fix shadowing in templates
xtian Aug 13, 2018
3720d8d
generator: Replace toString usage
xtian Aug 13, 2018
7df6a75
Update generated files
xtian Aug 13, 2018
8e8e08f
Use Elm 0.19 package from NPM
xtian Aug 21, 2018
2092987
Update deps for 0.19 release
xtian Aug 21, 2018
1fe7296
Update .travis.yml for Elm 0.19
xtian Aug 21, 2018
7867a24
Get dependencies compiling in generator elm.json.
dillonkearns Aug 22, 2018
761eb44
Update exposing lines in examples to get tests green.
dillonkearns Aug 22, 2018
69b250d
.travis.yml: Use LTS Node
xtian Aug 22, 2018
a81f0dd
Merge remote-tracking branch 'upstream/master' into elm@0.19
xtian Aug 22, 2018
8f8770f
Update binary.
dillonkearns Aug 23, 2018
e590bf6
Run ete_tests approval, update test output.
dillonkearns Aug 23, 2018
9497ec5
Remove low-level subscriptions protocol code.
dillonkearns Aug 23, 2018
b3a5774
Update elm-format version.
dillonkearns Aug 23, 2018
92f89b7
Upgrade code for examples.
dillonkearns Aug 23, 2018
d83b180
Get the StarWars example compiling.
dillonkearns Aug 23, 2018
82bd485
Update code generation to remove a shadowed variable. Get github example
dillonkearns Aug 23, 2018
d59635a
Get GithubComplex demo compiling.
dillonkearns Aug 23, 2018
d502abd
Get SimpleMutation example compiling.
dillonkearns Aug 23, 2018
8fe010b
Get normalize demo compiling.
dillonkearns Aug 23, 2018
83f0040
Remove unnecessary html file.
dillonkearns Aug 23, 2018
a674cfb
Run elm-format on generator tests and files and run generator test suite
dillonkearns Aug 23, 2018
a06f7ea
Run elm format on some source files.
dillonkearns Aug 23, 2018
1f944bf
Remove files.
dillonkearns Aug 23, 2018
3557a1c
Make sure that all examples compile in travis.
dillonkearns Aug 23, 2018
adde1d8
Update readme note about subscriptions.
dillonkearns Aug 23, 2018
3cce375
Add note about name change in readme.
dillonkearns Aug 23, 2018
ddc1d4f
Change elm package version.
dillonkearns Aug 23, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 4 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,23 @@ sudo: false

language: node_js
node_js:
"9.11.1"
"lts/*"

cache:
directories:
- test/elm-stuff/build-artifacts
- sysconfcpus
- node_modules

os:
- linux

env:
matrix:
- ELM_VERSION=0.18.0

before_install:
- npm i -g npm@^5.6.0
- npm --version
- |
# CI build time workaound
# https://github.com/elm-lang/elm-compiler/issues/1473#issuecomment-245704142
if [ ! -d $TRAVIS_BUILD_DIR/sysconfcpus/bin ]; then
git clone https://github.com/obmarg/libsysconfcpus.git
cd libsysconfcpus
./configure --prefix=$TRAVIS_BUILD_DIR/sysconfcpus
make && make install
fi
- ELM_VERSION=0.19.0

install:
- export PATH="$TRAVIS_BUILD_DIR/sysconfcpus/bin:$PATH"
- npm install

script:
- sysconfcpus -n 2 npm test
- sysconfcpus -n 2 npm run approve
- npm test
- npm run approve
18 changes: 18 additions & 0 deletions CHANGELOG-ELM-PACKAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [1.0.0] - 2018-08-22

### Removed

- **Subscriptions Low-Level Data-Transfer Layer** As before, this library will
generate code based on the subscriptions defined in your GraphQL schema.
And you will be able to use `Graphql.Document.serializeSubscription` to
get a `String` that you can send over to your server when you open a subscription.
Then you'll be able to use the `Graphql.Document.decoder` from your subscription
to decode the JSON responses from the server.
What's been removed is just the low level protocols for doing the websocket connection.
As per [this issue](https://github.com/dillonkearns/elm-graphql/issues/43),
this responsibility will be moved out of the core `dillonkearns/elm-graphql`
package in order to decouple this library from the low-level details which
differ between different GraphQL server implementations.

The low-level data transfer logic for connecting over websockets to a subscription
has been removed from this package.
https://github.com/dillonkearns/elm-graphql/issues/43

### Changed

- Rename package from `dillonkearns/graphqelm` to `dillonkearns/elm-graphql`
Expand Down
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

[![Build Status](https://travis-ci.org/dillonkearns/elm-graphql.svg?branch=master)](https://travis-ci.org/dillonkearns/elm-graphql)

(Formerly Graphqelm, [read about why the name changed.](https://github.com/dillonkearns/elm-graphql/issues/23))

Why use this package over the other available Elm GraphQL packages? This is the only one that
generates type-safe code for your entire schema. (It's also the only type-safe
library with Elm 0.18 support, see
Expand Down Expand Up @@ -132,10 +134,21 @@ All core features are supported. That is, you can build any query or mutation
with your `dillonkearns/elm-graphql`-generated code, and it is guaranteed to be valid according
to your server's schema.

I am currently experimenting with subscriptions, checkout
[this live demo](https://rebrand.ly/graphqelm-subscriptions) or
[`examples/src/Subscription.elm`](https://github.com/dillonkearns/elm-graphql/blob/master/examples/src/Subscription.elm)
for an example using Phoenix/Absinthe as a backend.
`dillonkearns/elm-graphql` will generate code for you to generate subscriptions
and decode the responses, but it doesn't deal with the low-level details for
how to send them over web sockets. To do that, you will need to use
custom code or a package that knows how to communicate over websockets (or whichever
protocol) to setup a subscription with your particular framework. See
[this discussion](https://github.com/dillonkearns/elm-graphql/issues/43) for why
those details are not handled by this library directly.

I would love to hear feedback if you are using GraphQL Subscriptions. In particular,
I'd love to see live code examples to drive any improvements to the Subscriptions
design. Please ping me on Slack, drop a message in the
[#graphql](https://elmlang.slack.com/channels/graphql) channel, or open up a
Github issue to discuss!

[this live demo](https://rebrand.ly/graphqelm-subscriptions).

I would like to investigate generating helpers to make pagination simpler
for Connections (based on the
Expand Down
Loading